diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-20 17:12:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-20 17:12:13 +0100 |
commit | 320d910064320f894a09ffdd1cd800ff5371e97f (patch) | |
tree | a95baa62ee0087bf3948c1e30624d7b1a408229d /src/testdir/test_cmdline.vim | |
parent | ccfaa075918639b57925b16902cad339ab39b18c (diff) |
patch 9.0.0517: when at the command line :redrawstatus does not work wellv9.0.0517
Problem: When at the command line :redrawstatus does not work well.
Solution: Only update the statuslines instead of the screen. (closes #11180)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index f81cec930c..00939f9105 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -216,7 +216,7 @@ func Test_redrawstatus_in_autocmd() let lines =<< trim END set laststatus=2 set statusline=%=:%{getcmdline()} - autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif + autocmd CmdlineChanged * redrawstatus END call writefile(lines, 'XTest_redrawstatus', 'D') @@ -226,8 +226,17 @@ func Test_redrawstatus_in_autocmd() 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 term_sendkeys(buf, "\<Esc>:for in in range(3)") call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_2', {}) + " with cmdheight=1 messages have scrolled when typing :endfor + call term_sendkeys(buf, "\<CR>:endfor") + call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_3', {}) + call term_sendkeys(buf, "\<CR>:set cmdheight=2\<CR>") + " with cmdheight=2 messages haven't scrolled when typing :for or :endfor + call term_sendkeys(buf, ":for in in range(3)") + call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_4', {}) + call term_sendkeys(buf, "\<CR>:endfor") + call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_5', {}) " clean up call term_sendkeys(buf, "\<CR>") |