mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0296: message in popup is shortened unnecessary
Problem: Message in popup is shortened unnecessary. Solution: Do not use 'showcmd' and 'ruler' for a message in the popup. Set the timer when unhiding the message popup.
This commit is contained in:
parent
00d4ceecca
commit
35a4fbc5d0
@ -206,7 +206,11 @@ msg_strtrunc(
|
|||||||
&& !exmode_active && msg_silent == 0) || force)
|
&& !exmode_active && msg_silent == 0) || force)
|
||||||
{
|
{
|
||||||
len = vim_strsize(s);
|
len = vim_strsize(s);
|
||||||
if (msg_scrolled != 0)
|
if (msg_scrolled != 0
|
||||||
|
#ifdef HAS_MESSAGE_WINDOW
|
||||||
|
|| use_message_window()
|
||||||
|
#endif
|
||||||
|
)
|
||||||
// Use all the columns.
|
// Use all the columns.
|
||||||
room = (int)(Rows - msg_row) * Columns - 1;
|
room = (int)(Rows - msg_row) * Columns - 1;
|
||||||
else
|
else
|
||||||
@ -3719,7 +3723,11 @@ msg_end(void)
|
|||||||
void
|
void
|
||||||
msg_check(void)
|
msg_check(void)
|
||||||
{
|
{
|
||||||
if (msg_row == Rows - 1 && msg_col >= sc_col)
|
if (msg_row == Rows - 1 && msg_col >= sc_col
|
||||||
|
#ifdef HAS_MESSAGE_WINDOW
|
||||||
|
&& !use_message_window()
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
need_wait_return = TRUE;
|
need_wait_return = TRUE;
|
||||||
redraw_cmdline = TRUE;
|
redraw_cmdline = TRUE;
|
||||||
|
@ -4501,7 +4501,7 @@ popup_show_message_win(void)
|
|||||||
popup_update_color(message_win, TYPE_MESSAGE_WIN);
|
popup_update_color(message_win, TYPE_MESSAGE_WIN);
|
||||||
popup_show(message_win);
|
popup_show(message_win);
|
||||||
}
|
}
|
||||||
else if (message_win->w_popup_timer != NULL)
|
if (message_win->w_popup_timer != NULL)
|
||||||
timer_start(message_win->w_popup_timer);
|
timer_start(message_win->w_popup_timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
src/testdir/dumps/Test_cmdheight_zero_4.dump
Normal file
6
src/testdir/dumps/Test_cmdheight_zero_4.dump
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
|
||||||
|
|~+0#4040ff13&| @73
|
||||||
|
|~| @73
|
||||||
|
|~| @73
|
||||||
|
|═+0#e000002&@74
|
||||||
|
|T|y|p|e| @1|:|q|a|!| @1|a|n|d| |p|r|e|s@1| |<|E|n|t|e|r|>| |t|o| |a|b|a|n|d|o|n| |a|l@1| |c|h|a|n|g|e|s| |a|n|d| |e|x|i|t| |V|i|m| @9
|
@ -493,10 +493,30 @@ func Test_cmdheight_zero_dump()
|
|||||||
call term_sendkeys(buf, "\<Esc>:echo 'message window'\<CR>")
|
call term_sendkeys(buf, "\<Esc>:echo 'message window'\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_cmdheight_zero_3', {})
|
call VerifyScreenDump(buf, 'Test_cmdheight_zero_3', {})
|
||||||
|
|
||||||
|
" Message for CTRL-C is in the popup window
|
||||||
|
"call term_sendkeys(buf, ":call popup_clear()\<CR>")
|
||||||
|
call term_sendkeys(buf, "\<C-C>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_cmdheight_zero_4', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XtestCmdheight')
|
call delete('XtestCmdheight')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_cmdheight_zero_shell()
|
||||||
|
CheckUnix
|
||||||
|
|
||||||
|
set cmdheight=0
|
||||||
|
set nomore
|
||||||
|
call setline(1, 'foo!')
|
||||||
|
silent !echo <cWORD> > Xfile.out
|
||||||
|
call assert_equal(['foo!'], readfile('Xfile.out'))
|
||||||
|
call delete('Xfile.out')
|
||||||
|
redraw!
|
||||||
|
|
||||||
|
set more&
|
||||||
|
set cmdheight&
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -707,6 +707,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 */
|
||||||
|
/**/
|
||||||
|
296,
|
||||||
/**/
|
/**/
|
||||||
295,
|
295,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user