Mercurial > vim
diff src/testdir/test_cmdline.vim @ 30363:48c73657679c v9.0.0517
patch 9.0.0517: when at the command line :redrawstatus does not work well
Commit: https://github.com/vim/vim/commit/320d910064320f894a09ffdd1cd800ff5371e97f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Sep 20 17:12:13 2022 +0100
patch 9.0.0517: when at the command line :redrawstatus does not work well
Problem: When at the command line :redrawstatus does not work well.
Solution: Only update the statuslines instead of the screen. (closes https://github.com/vim/vim/issues/11180)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Sep 2022 18:15:03 +0200 |
parents | 7cd4655d7bf1 |
children | 57ebc2a4d2ca |
line wrap: on
line diff
--- 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>")