Repository: neovim
Issue: inccommand=split does not work with mulitgrid
Labels: bug,ui,ui-extensibility,display,inccommand

### Problem

For more details see https://github.com/neovide/neovide/issues/1947

When using `inccommand=split` together with Neovide, the window is blank This is caused by a new window being created and then being destroyed before it has a chance to show. This repeats for each character typed. See the following log from Neovide

```
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowPosition { grid: 2, start_row: 0, start_column: 0, width: 104, height: 38 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 0, column_start: 1, cells: [GridLineCell { text: "a", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 1, column_start: 1, cells: [GridLineCell { text: "a", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 2, column_start: 1, cells: [GridLineCell { text: "a", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 3, column_start: 1, cells: [GridLineCell { text: "a", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 4, column_start: 1, cells: [GridLineCell { text: "a", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Resize { grid: 10, width: 104, height: 7 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 0, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "1", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(98) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 1, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "2", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(98) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 2, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "3", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(98) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 3, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "4", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(98) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 4, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "5", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(98) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 5, column_start: 0, cells: [GridLineCell { text: "~", highlight_id: Some(7), repeat: None }, GridLineCell { text: " ", highlight_id: Some(7), repeat: Some(103) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 10, row: 6, column_start: 0, cells: [GridLineCell { text: "~", highlight_id: Some(7), repeat: None }, GridLineCell { text: " ", highlight_id: Some(7), repeat: Some(103) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowClose { grid: 10 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Destroy { grid: 10 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowPosition { grid: 2, start_row: 0, start_column: 0, width: 104, height: 46 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Flush)
```

In this case  `grid: 10 ` is both created and destroyed, and then again for the next character typed
```
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowPosition { grid: 2, start_row: 0, start_column: 0, width: 104, height: 38 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 0, column_start: 2, cells: [GridLineCell { text: "r", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 1, column_start: 2, cells: [GridLineCell { text: "r", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 2, column_start: 2, cells: [GridLineCell { text: "r", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 3, column_start: 2, cells: [GridLineCell { text: "r", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 2, row: 4, column_start: 2, cells: [GridLineCell { text: "r", highlight_id: Some(10), repeat: None }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Resize { grid: 11, width: 104, height: 7 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 0, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "1", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: "r", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(97) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 1, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "2", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: "r", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(97) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 2, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "3", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: "r", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(97) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 3, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "4", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: "r", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(97) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 4, column_start: 0, cells: [GridLineCell { text: "|", highlight_id: Some(0), repeat: None }, GridLineCell { text: "5", highlight_id: None, repeat: None }, GridLineCell { text: "|", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "b", highlight_id: Some(10), repeat: None }, GridLineCell { text: "a", highlight_id: None, repeat: None }, GridLineCell { text: "r", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(97) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 5, column_start: 0, cells: [GridLineCell { text: "~", highlight_id: Some(7), repeat: None }, GridLineCell { text: " ", highlight_id: Some(7), repeat: Some(103) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(GridLine { grid: 11, row: 6, column_start: 0, cells: [GridLineCell { text: "~", highlight_id: Some(7), repeat: None }, GridLineCell { text: " ", highlight_id: Some(7), repeat: Some(103) }] })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowClose { grid: 11 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Destroy { grid: 11 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(WindowPosition { grid: 2, start_row: 0, start_column: 0, width: 104, height: 46 })
TRACE [neovide::channel_utils] neovide::editor::EditorCommand NeovimRedrawEvent(Flush)
```


### Steps to reproduce

**To Reproduce**
Steps to reproduce the behavior:
1. `neovide -- --clean foo.txt`, where `foo.txt` is
```
foo
foo
foo
foo
foo
```
2. `:set inccommand=split`
3. `:%s/foo/bar`

### Expected behavior

The inccommand window shows a preview of the substitution.

### Neovim version (nvim -v)

neovim/neovim@14d047a

### Vim (not Nvim) behaves the same?

N/A

### Operating system/version

Arch Linux

### Terminal name/version

Neovide version: 0.10.4

### $TERM environment variable

N/A

### Installation

unknown