forked from aniani/vim
patch 9.1.0855: setting 'cmdheight' may cause hit-enter-prompt
Problem: setting 'cmdheight' may cause hit-enter-prompt and echo output to be missing Solution: Before cleaning the cmdline, check the need_wait_return flag (nwounkn) closes: #13432 Signed-off-by: nwounkn <nwounkn@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
feea1b444e
commit
2e48567007
8
src/testdir/dumps/Test_changing_cmdheight_7.dump
Normal file
8
src/testdir/dumps/Test_changing_cmdheight_7.dump
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|~+0#4040ff13#ffffff0| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|[+3#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
|
||||||
|
|f+0&&|o@1| @71
|
||||||
|
|b|a|r| @71
|
||||||
|
|P+0#00e0003&|r|e|s@1| |E|N|T|E|R| |o|r| |t|y|p|e| |c|o|m@1|a|n|d| |t|o| |c|o|n|t|i|n|u|e> +0#0000000&@35
|
@@ -270,6 +270,12 @@ func Test_changing_cmdheight()
|
|||||||
|
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
set cmdheight=1 laststatus=2
|
set cmdheight=1 laststatus=2
|
||||||
|
func EchoOne()
|
||||||
|
set laststatus=2 cmdheight=1
|
||||||
|
echo 'foo'
|
||||||
|
echo 'bar'
|
||||||
|
set cmdheight=2
|
||||||
|
endfunc
|
||||||
func EchoTwo()
|
func EchoTwo()
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set cmdheight=5
|
set cmdheight=5
|
||||||
@@ -305,6 +311,10 @@ func Test_changing_cmdheight()
|
|||||||
call term_sendkeys(buf, ":call EchoTwo()\<CR>")
|
call term_sendkeys(buf, ":call EchoTwo()\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_changing_cmdheight_6', {})
|
call VerifyScreenDump(buf, 'Test_changing_cmdheight_6', {})
|
||||||
|
|
||||||
|
" increasing 'cmdheight' doesn't clear the messages that need hit-enter
|
||||||
|
call term_sendkeys(buf, ":call EchoOne()\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_changing_cmdheight_7', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
855,
|
||||||
/**/
|
/**/
|
||||||
854,
|
854,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -7343,11 +7343,14 @@ command_height(void)
|
|||||||
// Recompute window positions.
|
// Recompute window positions.
|
||||||
(void)win_comp_pos();
|
(void)win_comp_pos();
|
||||||
|
|
||||||
|
if (!need_wait_return)
|
||||||
|
{
|
||||||
// clear the lines added to cmdline
|
// clear the lines added to cmdline
|
||||||
if (full_screen)
|
if (full_screen)
|
||||||
screen_fill(cmdline_row, (int)Rows, 0,
|
screen_fill(cmdline_row, (int)Rows, 0,
|
||||||
(int)Columns, ' ', ' ', 0);
|
(int)Columns, ' ', ' ', 0);
|
||||||
msg_row = cmdline_row;
|
msg_row = cmdline_row;
|
||||||
|
}
|
||||||
redraw_cmdline = TRUE;
|
redraw_cmdline = TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user