mirror of
https://github.com/neovim/neovim
synced 2025-07-16 17:21:49 +00:00
fix(editor): avoid scrolling :substitute confirm message #32149
Regression from 48e2a73
.
This commit is contained in:
@ -3799,6 +3799,8 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const int cmdpreview_n
|
|||||||
typed = prompt_for_input(p, HLF_R, true, NULL);
|
typed = prompt_for_input(p, HLF_R, true, NULL);
|
||||||
xfree(p);
|
xfree(p);
|
||||||
|
|
||||||
|
msg_didout = false; // don't scroll up
|
||||||
|
gotocmdline(true);
|
||||||
p_lz = save_p_lz;
|
p_lz = save_p_lz;
|
||||||
RedrawingDisabled = temp;
|
RedrawingDisabled = temp;
|
||||||
|
|
||||||
|
@ -1050,6 +1050,24 @@ describe('cmdline redraw', function()
|
|||||||
{6:[Y]es, (N)o, (C)ancel: }^ |
|
{6:[Y]es, (N)o, (C)ancel: }^ |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('substitute confirm prompt does not scroll', function()
|
||||||
|
screen:try_resize(75, screen._height)
|
||||||
|
command('call setline(1, "foo")')
|
||||||
|
command('set report=0')
|
||||||
|
feed(':%s/foo/bar/c<CR>')
|
||||||
|
screen:expect([[
|
||||||
|
{2:foo} |
|
||||||
|
{1:~ }|*3
|
||||||
|
{6:replace with bar? (y)es/(n)o/(a)ll/(q)uit/(l)ast/scroll up(^E)/down(^Y)}^ |
|
||||||
|
]])
|
||||||
|
feed('y')
|
||||||
|
screen:expect([[
|
||||||
|
^bar |
|
||||||
|
{1:~ }|*3
|
||||||
|
1 substitution on 1 line |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('statusline is redrawn on entering cmdline', function()
|
describe('statusline is redrawn on entering cmdline', function()
|
||||||
|
Reference in New Issue
Block a user