diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-20 20:54:07 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-09-20 21:01:00 +0800 |
commit | 2e4532bea50e5f6fb68ebf750c461c5704fc58c2 (patch) | |
tree | 32211d325eb5e35ab4dcef48e75520982a30a1bf /test/functional/legacy/cmdline_spec.lua | |
parent | 9413f7544bcab6951f9a0c26c4b2e1a6dc477c82 (diff) | |
download | rneovim-2e4532bea50e5f6fb68ebf750c461c5704fc58c2.tar.gz rneovim-2e4532bea50e5f6fb68ebf750c461c5704fc58c2.tar.bz2 rneovim-2e4532bea50e5f6fb68ebf750c461c5704fc58c2.zip |
vim-patch:9.0.0512: cannot redraw the status lines when editing a command
Problem: Cannot redraw the status lines when editing a command.
Solution: Only postpone the redraw when messages have scrolled.
(closes vim/vim#11170)
https://github.com/vim/vim/commit/c14bfc31d907cbee6a3636f780561ad1787cdb9b
Diffstat (limited to 'test/functional/legacy/cmdline_spec.lua')
-rw-r--r-- | test/functional/legacy/cmdline_spec.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua index 8ea5754cfa..8325f7eeb0 100644 --- a/test/functional/legacy/cmdline_spec.lua +++ b/test/functional/legacy/cmdline_spec.lua @@ -178,13 +178,15 @@ describe('cmdline', function() local screen = Screen.new(60, 6) screen:set_default_attr_ids({ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText - [1] = {bold = true, reverse = true}, -- MsgSeparator + [1] = {bold = true, reverse = true}, -- MsgSeparator, StatusLine }) screen:attach() exec([[ - set cmdheight=2 + set laststatus=2 + set statusline=%=:%{getcmdline()} autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif ]]) + -- :redrawstatus is postponed if messages have scrolled feed([[:echo "one\ntwo\nthree\nfour"<CR>]]) feed(':foobar') screen:expect([[ @@ -195,6 +197,16 @@ describe('cmdline', function() four | :foobar^ | ]]) + -- it is not postponed if messages have not scrolled + feed('<Esc>:foobar') + screen:expect([[ + | + {0:~ }| + {0:~ }| + {0:~ }| + {1: :foobar}| + :foobar^ | + ]]) end) end) |