diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-18 15:08:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-18 15:08:19 +0100 |
commit | b2f0ca820eae50994745106d824e215d87bd7926 (patch) | |
tree | 9fa5e1872f7138b1794aef6ffd85209874d125b8 /src/testdir | |
parent | 566badc76ba7c0fbdc75e62f79486182304fc7cc (diff) |
patch 9.0.0500: when quitting cmdline window with CTRL-C it remains visiblev9.0.0500
Problem: When quitting the cmdline window with CTRL-C it remains visible.
Solution: Redraw to avoid confusion. Adjust the error message.
(closes #11152) Adjust the cursor position after CTRL-C.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_cmdwin_wrong_command_1.dump | 12 | ||||
-rw-r--r-- | src/testdir/dumps/Test_cmdwin_wrong_command_2.dump | 12 | ||||
-rw-r--r-- | src/testdir/test_cmdwin.vim | 21 |
3 files changed, 41 insertions, 4 deletions
diff --git a/src/testdir/dumps/Test_cmdwin_wrong_command_1.dump b/src/testdir/dumps/Test_cmdwin_wrong_command_1.dump new file mode 100644 index 0000000000..95a686bfe2 --- /dev/null +++ b/src/testdir/dumps/Test_cmdwin_wrong_command_1.dump @@ -0,0 +1,12 @@ +| +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1 +|:+0#4040ff13&|l+0#af5f00255&>s| +0#0000000&@71 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|[+3#0000000&|C|o|m@1|a|n|d| |L|i|n|e|]| @42|1|,|2| @11|A|l@1 +|E+0#ffffff16#e000002|1@1|:| |I|n|v|a|l|i|d| |i|n| |c|o|m@1|a|n|d|-|l|i|n|e| |w|i|n|d|o|w|;| |:|q|<|C|R|>| |c|l|o|s|e|s| |t|h|e| |w|i|n|d|o|w| +0#0000000#ffffff0@13 diff --git a/src/testdir/dumps/Test_cmdwin_wrong_command_2.dump b/src/testdir/dumps/Test_cmdwin_wrong_command_2.dump new file mode 100644 index 0000000000..3ef02cdf07 --- /dev/null +++ b/src/testdir/dumps/Test_cmdwin_wrong_command_2.dump @@ -0,0 +1,12 @@ +| +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|:+0#0000000&|l|s> @71 diff --git a/src/testdir/test_cmdwin.vim b/src/testdir/test_cmdwin.vim index 8066831f10..6a420ed0aa 100644 --- a/src/testdir/test_cmdwin.vim +++ b/src/testdir/test_cmdwin.vim @@ -73,7 +73,6 @@ func Test_cmdwin_restore() call writefile(lines, 'XTest_restore', 'D') let buf = RunVimInTerminal('-S XTest_restore', {'rows': 12}) - call TermWait(buf, 50) call term_sendkeys(buf, "q:") call VerifyScreenDump(buf, 'Test_cmdwin_restore_1', {}) @@ -93,11 +92,9 @@ func Test_cmdwin_restore() endfunc func Test_cmdwin_no_terminal() - CheckFeature terminal - CheckNotMSWindows + CheckScreendump let buf = RunVimInTerminal('', {'rows': 12}) - call TermWait(buf, 50) call term_sendkeys(buf, ":set cmdheight=2\<CR>") call term_sendkeys(buf, "q:") call term_sendkeys(buf, ":let buf = term_start(['/bin/echo'], #{hidden: 1})\<CR>") @@ -106,6 +103,22 @@ func Test_cmdwin_no_terminal() call StopVimInTerminal(buf) endfunc +func Test_cmdwin_wrong_command() + CheckScreendump + + let buf = RunVimInTerminal('', {'rows': 12}) + call term_sendkeys(buf, "q:") + call term_sendkeys(buf, "als\<Esc>") + call term_sendkeys(buf, "\<C-W>k") + call VerifyScreenDump(buf, 'Test_cmdwin_wrong_command_1', {}) + + call term_sendkeys(buf, "\<C-C>") + call VerifyScreenDump(buf, 'Test_cmdwin_wrong_command_2', {}) + + call term_sendkeys(buf, ":q\<CR>") + call StopVimInTerminal(buf) +endfunc + func Test_cmdwin_feedkeys() " This should not generate E488 call feedkeys("q:\<CR>", 'x') |