diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-01-22 16:36:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-22 07:36:57 -0800 |
commit | 34344b939c060d36db719f17088639744ca61c94 (patch) | |
tree | 22f2f1147d0cc2ae0a466c3e92f3f788bc0af6b3 /test/functional/ui/cmdline_spec.lua | |
parent | 22fd52325bf60cadaf24bca328a602764f53d6a9 (diff) | |
download | rneovim-34344b939c060d36db719f17088639744ca61c94.tar.gz rneovim-34344b939c060d36db719f17088639744ca61c94.tar.bz2 rneovim-34344b939c060d36db719f17088639744ca61c94.zip |
fix(editor): avoid scrolling :substitute confirm message #32149
Regression from 48e2a73.
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index a2722a4139..d6dd62108c 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -1050,6 +1050,24 @@ describe('cmdline redraw', function() {6:[Y]es, (N)o, (C)ancel: }^ | ]]) 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) describe('statusline is redrawn on entering cmdline', function() |