diff options
-rw-r--r-- | src/nvim/ex_getln.c | 1 | ||||
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 38432a34db..17292dfde1 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3483,6 +3483,7 @@ void compute_cmdrow(void) cmdline_row = wp->w_winrow + wp->w_height + wp->w_status_height; } + lines_left = cmdline_row; } static void cursorcmd(void) diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 4f243e6413..238cc368da 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -2634,3 +2634,19 @@ it(':substitute with inccommand, timer-induced :redraw #9777', function() :%s/foo/ZZZ^ | ]]) end) + +it('long :%s/ with inccommand does not collapse cmdline', function() + local screen = Screen.new(10,5) + clear() + common_setup(screen) + command('set inccommand=nosplit') + feed(':%s/AAAAAAA', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', + 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A') + screen:expect([[ + {15:~ }| + {15:~ }| + :%s/AAAAAAAA| + AAAAAAAAAAAA| + AAAAAAA^ | + ]]) +end) |