summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-20 13:17:57 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-20 13:17:57 +0100
commitc14bfc31d907cbee6a3636f780561ad1787cdb9b (patch)
tree4fdf0e832dd4def2a38a061a4954ea8609a3a992 /src/testdir/test_cmdline.vim
parentbdedd2bcce3a59028c7504a397ff77d901b1b12a (diff)
downloadvim-git-c14bfc31d907cbee6a3636f780561ad1787cdb9b.tar.gz
patch 9.0.0512: cannot redraw the status lines when editing a commandv9.0.0512
Problem: Cannot redraw the status lines when editing a command. Solution: Only postpone the redraw when messages have scrolled. (closes #11170)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 3014ac36a..f81cec930 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -214,15 +214,20 @@ func Test_redrawstatus_in_autocmd()
CheckScreendump
let lines =<< trim END
- set cmdheight=2
+ set laststatus=2
+ set statusline=%=:%{getcmdline()}
autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif
END
call writefile(lines, 'XTest_redrawstatus', 'D')
let buf = RunVimInTerminal('-S XTest_redrawstatus', {'rows': 8})
+ " :redrawstatus is postponed if messages have scrolled
call term_sendkeys(buf, ":echo \"one\\ntwo\\nthree\\nfour\"\<CR>")
call term_sendkeys(buf, ":foobar")
call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {})
+ " it is not postponed if messages have not scrolled
+ call term_sendkeys(buf, "\<Esc>:foobar")
+ call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_2', {})
" clean up
call term_sendkeys(buf, "\<CR>")