diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-19 21:16:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-19 21:16:12 +0100 |
commit | bcd6924245c0e73d8be256282656c06aaf91f17c (patch) | |
tree | 45d89a7e9af86b0382296b7e918e62e70a673235 /src/testdir/test_cmdline.vim | |
parent | a2b91036d12e1b406ed5d17bf03f8d1ed05221f6 (diff) |
patch 9.0.0507: cmdline cleared when using :redrawstatus in CmdlineChangedv9.0.0507
Problem: Command line cleared when using :redrawstatus in CmdlineChanged
autocommand event.
Solution: Postpone the redraw. (closes #11162)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 27ca8bf841..3014ac36a5 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -210,6 +210,25 @@ func Test_redraw_in_autocmd() call StopVimInTerminal(buf) endfunc +func Test_redrawstatus_in_autocmd() + CheckScreendump + + let lines =<< trim END + set cmdheight=2 + autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif + END + call writefile(lines, 'XTest_redrawstatus', 'D') + + let buf = RunVimInTerminal('-S XTest_redrawstatus', {'rows': 8}) + call term_sendkeys(buf, ":echo \"one\\ntwo\\nthree\\nfour\"\<CR>") + call term_sendkeys(buf, ":foobar") + call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {}) + + " clean up + call term_sendkeys(buf, "\<CR>") + call StopVimInTerminal(buf) +endfunc + func Test_changing_cmdheight() CheckScreendump |