Problem: The 'cmdheight' zero support causes too much trouble.
Solution: Revert support for 'cmdheight' being zero.
*'cmdheight'* *'ch'*
'cmdheight' 'ch' number (default 1)
global or local to tab page
- Number of screen lines to use for the command-line. Helps avoiding
- |hit-enter| prompts.
+ Number of screen lines to use for the command-line. A larger value
+ helps avoiding |hit-enter| prompts.
The value of this option is stored with the tab page, so that each tab
page can have a different value.
- When 'cmdheight' is zero, there is no command-line unless it is being
- used. Informative messages will be displayed in a popup notification
- window at the bottom if the window, using the MessageWindow highlight
- group {only if compiled with the +popupwin and +timers features},
- otherwise they will not be displayed. Other messages will cause the
- |hit-enter| prompt. Expect some other unexpected behavior too.
-
*'cmdwinheight'* *'cwh'*
'cmdwinheight' 'cwh' number (default 7)
global
45% relative position in the file
If 'rulerformat' is set, it will determine the contents of the ruler.
Each window has its own ruler. If a window has a status line, the
- ruler is shown there. If a window doesn't have a status line and
- 'cmdheight' is zero, the ruler is not shown. Otherwise it is shown in
- the last line of the screen. If the statusline is given by
- 'statusline' (i.e. not empty), this option takes precedence over
- 'ruler' and 'rulerformat'.
+ ruler is shown there. Otherwise it is shown in the last line of the
+ screen. If the statusline is given by 'statusline' (i.e. not empty),
+ this option takes precedence over 'ruler' and 'rulerformat'.
If the number of characters displayed is different from the number of
bytes in the text (e.g., for a TAB or a multibyte character), both
the text column (byte number) and the screen column are shown,
|+cmdline_info| feature}
Show (partial) command in the last line of the screen. Set this
option off if your terminal is slow.
- The option has no effect when 'cmdheight' is zero.
In Visual mode the size of the selected area is shown:
- When selecting characters within a line, the number of characters.
If the number of bytes is different it is also displayed: "2-6"
If in Insert, Replace or Visual mode put a message on the last line.
Use the 'M' flag in 'highlight' to set the type of highlighting for
this message.
- The option has no effect when 'cmdheight' is zero.
When |XIM| may be used the message will include "XIM". But this
doesn't mean XIM is really active, especially when 'imactivatekey' is
not set.
int off = 0;
int width;
- // If 'ruler' off or messages area disabled, don't do anything
- if (!p_ru || (wp->w_status_height == 0 && p_ch == 0))
+ // If 'ruler' off don't do anything
+ if (!p_ru)
return;
/*
return;
#ifdef FEAT_STL_OPT
- if (*p_ruf && p_ch > 0)
+ if (*p_ruf)
{
int called_emsg_before = called_emsg;
// Move the entries that were scrolled, disable
// the entries for the lines to be redrawn.
- // Avoid using a wrong index when 'cmdheight' is
- // zero and wp->w_height == Rows.
if ((wp->w_lines_valid += j) > wp->w_height)
wp->w_lines_valid = wp->w_height;
- for (idx = wp->w_lines_valid >= wp->w_height
- ? wp->w_height - 1 : wp->w_lines_valid;
- idx - j >= 0; idx--)
+ for (idx = wp->w_lines_valid; idx - j >= 0; idx--)
wp->w_lines[idx] = wp->w_lines[idx - j];
while (idx >= 0)
wp->w_lines[idx--].wl_valid = FALSE;
if (wp->w_lines_valid > wp->w_height)
wp->w_lines_valid = wp->w_height;
for (i = wp->w_lines_valid; i - j >= idx; --i)
- if (i < Rows)
- wp->w_lines[i] = wp->w_lines[i - j];
+ wp->w_lines[i] = wp->w_lines[i - j];
// The w_lines[] entries for inserted lines are
// now invalid, but wl_size may be used above.
// Past end of the window or end of the screen. Note that after
// resizing wp->w_height may be end up too big. That's a problem
// elsewhere, but prevent a crash here.
- if (row > wp->w_height
- || row + wp->w_winrow >= (p_ch > 0 ? Rows : Rows + 1))
+ if (row > wp->w_height || row + wp->w_winrow >= Rows)
{
// we may need the size of that too long line later on
if (dollar_vcol == -1)
// Safety check: if any of the wl_size values is wrong we might go over
// the end of w_lines[].
- if (idx >= (p_ch > 0 ? Rows : Rows + 1))
+ if (idx >= Rows)
break;
}
redraw_later(type);
if (msg_scrolled
|| (State != MODE_NORMAL && State != MODE_NORMAL_BUSY)
- || exiting
- || p_ch == 0)
+ || exiting)
return ret;
// Allocate space to save the text displayed in the command line area.
if (eap->skip)
--emsg_skip;
#ifdef HAS_MESSAGE_WINDOW
- if (use_message_window() && eap->cmdidx != CMD_execute)
+ if (eap->cmdidx == CMD_echowindow)
{
// show the message window now
ex_redraw(eap);
// do not overwrite messages
+ // TODO: only for message window
msg_didout = TRUE;
if (msg_col == 0)
msg_col = 1;
+ in_echowindow = FALSE;
}
- in_echowindow = FALSE;
#endif
set_nextcmd(eap, arg);
}
if (addr_count == 0) // :!
{
// echo the command
- dont_use_message_window();
msg_start();
msg_putchar(':');
msg_putchar('!');
int endcolumn = FALSE; // cursor in last column when done
pos_T old_cursor = curwin->w_cursor;
int start_nsubs;
- int cmdheight0 = p_ch == 0;
#ifdef FEAT_EVAL
int save_ma = 0;
int save_sandbox = 0;
}
}
- if (cmdheight0)
- {
- // If cmdheight is 0, cmdheight must be set to 1 when we enter command
- // line.
- set_option_value((char_u *)"ch", 1L, NULL, 0);
- redraw_statuslines();
- }
-
/*
* Check for a match on each line.
*/
changed_window_setting();
#endif
- // Restore cmdheight
- if (cmdheight0)
- set_option_value((char_u *)"ch", 0L, NULL, 0);
-
vim_regfree(regmatch.regprog);
vim_free(sub_copy);
// After drawing the statusline screen_attr may still be set.
screen_stop_highlight();
-#ifdef HAS_MESSAGE_WINDOW
- if (!use_message_window()) // append messages in the message window
-#endif
- {
- // Reset msg_didout, so that a message that's there is overwritten.
- msg_didout = FALSE;
- msg_col = 0;
- }
+ // Reset msg_didout, so that a message that's there is overwritten.
+ msg_didout = FALSE;
+ msg_col = 0;
// No need to wait after an intentional redraw.
need_wait_return = FALSE;
int did_save_ccline = FALSE;
int cmdline_type;
int wild_type;
- int cmdheight0 = p_ch == 0;
-
- if (cmdheight0)
- {
- int save_so = lastwin->w_p_so;
-
- // If cmdheight is 0, cmdheight must be set to 1 when we enter the
- // command line. Set "made_cmdheight_nonzero" and reset 'scrolloff' to
- // avoid scrolling the last window.
- made_cmdheight_nonzero = TRUE;
- lastwin->w_p_so = 0;
- set_option_value((char_u *)"ch", 1L, NULL, 0);
-#ifdef HAS_MESSAGE_WINDOW
- popup_hide_message_win();
-#endif
- update_screen(UPD_VALID); // redraw the screen NOW
- made_cmdheight_nonzero = FALSE;
- lastwin->w_p_so = save_so;
- }
// one recursion level deeper
++depth;
{
char_u *p = ccline.cmdbuff;
- if (cmdheight0)
- {
- made_cmdheight_nonzero = TRUE;
- set_option_value((char_u *)"ch", 0L, NULL, 0);
- // Redraw is needed for command line completion
- redraw_all_later(UPD_NOT_VALID);
- made_cmdheight_nonzero = FALSE;
- }
-
--depth;
if (did_save_ccline)
restore_cmdline(&save_ccline);
--no_mapping;
--allow_keys;
- // redraw the screen after getchar()
- if (p_ch == 0)
- update_screen(UPD_NOT_VALID);
-
set_vim_var_nr(VV_MOUSE_WIN, 0);
set_vim_var_nr(VV_MOUSE_WINID, 0);
set_vim_var_nr(VV_MOUSE_LNUM, 0);
// While executing a regexp and set to OPTION_MAGIC_ON or OPTION_MAGIC_OFF this
// overrules p_magic. Otherwise set to OPTION_MAGIC_NOT_SET.
EXTERN optmagic_T magic_overruled INIT(= OPTION_MAGIC_NOT_SET);
-
-// Set when 'cmdheight' is changed from zero to one temporarily.
-EXTERN int made_cmdheight_nonzero INIT(= FALSE);
// If no argument, list current highlighting.
if (!init && ends_excmd2(line - 1, line))
{
- dont_use_message_window();
for (i = 1; i <= highlight_ga.ga_len && !got_int; ++i)
// TODO: only call when the group has attributes set
highlight_list_one((int)i);
stat_T st;
time_t swap_mtime;
- dont_use_message_window();
++no_wait_return;
(void)emsg(_(e_attention));
msg_puts(_("\nFound a swap file by the name \""));
len = vim_strsize(s);
if (msg_scrolled != 0
#ifdef HAS_MESSAGE_WINDOW
- || use_message_window()
+ || in_echowindow
#endif
)
// Use all the columns.
}
#ifdef HAS_MESSAGE_WINDOW
- if (!use_message_window())
+ if (!in_echowindow)
#endif
emsg_on_display = TRUE; // remember there is an error message
// negative.
room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1;
if (room > 0 && (force || (shortmess(SHM_TRUNC) && !exmode_active))
- && (n = (int)STRLEN(s) - room) > 0 && p_ch > 0)
+ && (n = (int)STRLEN(s) - room) > 0)
{
if (has_mbyte)
{
}
msg_hist_off = TRUE;
- dont_use_message_window();
p = first_msg_hist;
if (eap->addr_count != 0)
}
#endif
-/*
- * Return TRUE when the message popup window should be used.
- */
- int
-use_message_window(void)
-{
-#ifdef HAS_MESSAGE_WINDOW
- // TRUE if there is no command line showing ('cmdheight' is zero and not
- // already editing or showing a message) use a popup window for messages.
- // Also when using ":echowindow".
- return (p_ch == 0 && cmdline_row >= Rows) || in_echowindow;
-#else
- return FALSE;
-#endif
-}
-
-/*
- * Do not use the message window for the next message(s).
- * Used when giving a prompt.
- */
- void
-dont_use_message_window(void)
-{
-#ifdef HAS_MESSAGE_WINDOW
- popup_hide_message_win();
- cmdline_row = Rows - 1;
-#endif
-}
-
/*
* Prepare for outputting characters in the command line.
*/
}
#ifdef FEAT_EVAL
- if (need_clr_eos || use_message_window())
+ if (need_clr_eos || in_echowindow)
{
// Halfway an ":echo" command and getting an (error) message: clear
// any text from the command.
#endif
#ifdef HAS_MESSAGE_WINDOW
- if (use_message_window())
+ if (in_echowindow)
{
if (popup_message_win_visible()
&& ((msg_col > 0 && (msg_scroll || !full_screen))
#endif
0;
}
- else if (msg_didout || use_message_window())
+ else if (msg_didout || in_echowindow)
{
// start message on next line
msg_putchar('\n');
#define PUT_BELOW 2 // add below "lnum"
//
#ifdef HAS_MESSAGE_WINDOW
-
/*
* Put text "t_s" until "end" in the message window.
* "where" specifies where to put the text.
win_T *msg_win = NULL;
linenr_T lnum = 1;
- if (use_message_window())
+ if (in_echowindow)
{
msg_win = popup_get_message_win();
msg_scroll_up(void)
{
#ifdef HAS_MESSAGE_WINDOW
- if (use_message_window())
+ if (in_echowindow)
return;
#endif
#ifdef FEAT_GUI
out_str(T_CE); // clear to end of line
}
}
- else if (p_ch > 0)
+ else
{
#ifdef FEAT_RIGHTLEFT
if (cmdmsg_rl)
{
if (msg_row == Rows - 1 && msg_col >= sc_col
#ifdef HAS_MESSAGE_WINDOW
- && !use_message_window()
+ && !in_echowindow
#endif
)
{
}
#endif
- dont_use_message_window();
oldState = State;
State = MODE_CONFIRM;
setmouse();
{
int len;
- if (p_ch == 0)
- return;
-
cursor_off();
len = (int)STRLEN(showcmd_buf);
// Don't shorten this message, the user asked for it.
p = p_shm;
p_shm = (char_u *)"";
- if (p_ch < 1)
- {
- msg_start();
- msg_scroll = TRUE;
- }
msg((char *)IObuff);
p_shm = p;
}
// if p_ch changed value, change the command line height
else if (pp == &p_ch)
{
- if (p_ch < 0)
+ if (p_ch < 1)
{
errmsg = e_argument_must_be_positive;
p_ch = 1;
};
#ifdef HAS_MESSAGE_WINDOW
-// Window used for messages when 'winheight' is zero.
+// Window used for ":echowindow"
static win_T *message_win = NULL;
#endif
popup_hide(message_win);
}
-/*
- * If the message window exists: close it.
- */
- void
-popup_close_message_win(void)
-{
- if (message_win != NULL)
- popup_close(message_win->w_id, TRUE);
-}
-
#endif
/*
void wait_return(int redraw);
void set_keep_msg(char_u *s, int attr);
void set_keep_msg_from_hist(void);
-int use_message_window(void);
-void dont_use_message_window(void);
void msg_start(void);
void msg_starthere(void);
void msg_putchar(int c);
void popup_show_message_win(void);
int popup_message_win_visible(void);
void popup_hide_message_win(void);
-void popup_close_message_win(void);
int popup_win_closed(win_T *win);
void popup_set_title(win_T *wp);
void popup_update_preview_title(void);
{
char_u *p;
static int regname;
- static int changed_cmdheight = FALSE;
yankreg_T *old_y_previous, *old_y_current;
int retval;
showmode();
regname = c;
retval = OK;
-
- if (p_ch < 1)
- {
- // Enable macro indicator temporarily
- set_option_value((char_u *)"ch", 1L, NULL, 0);
- update_screen(UPD_VALID);
-
- changed_cmdheight = TRUE;
- }
}
}
else // stop recording
y_previous = old_y_previous;
y_current = old_y_current;
}
-
- if (changed_cmdheight)
- {
- // Restore cmdheight
- set_option_value((char_u *)"ch", 0L, NULL, 0);
- redraw_all_later(UPD_CLEAR);
- }
}
return retval;
}
int nwr_save;
int sub_attr;
- do_mode = p_smd && msg_silent == 0 && p_ch > 0
+ do_mode = p_smd && msg_silent == 0
&& ((State & MODE_INSERT)
|| restart_edit != NUL
|| VIsual_active);
int
messaging(void)
{
- return (!(p_lz && char_avail() && !KeyTyped)) && p_ch > 0;
+ return (!(p_lz && char_avail() && !KeyTyped));
}
/*
+++ /dev/null
->s+0&#ffffff0|o|m|e| |t|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
+++ /dev/null
-|s+0&#e0e0e08|o|m|e| >t+0&#ffffff0|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
+++ /dev/null
-|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|═+0#e000002&@74
-|m|e|s@1|a|g|e| |w|i|n|d|o|w| @60
+++ /dev/null
-|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
+++ /dev/null
-|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|═+0#e000002&@74
-|"|X|s|o|m|e|T|e|x|t|"| |[|N|e|w|]| |1|L|,| |1|0|B| |w|r|i|t@1|e|n| @41
+++ /dev/null
-|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
+++ /dev/null
-|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
-|~+0#4040ff13&| @73
-|~| @73
-|═+0#e000002&@74
-|s|o|m|e| |t|e|x|t| @65
-|s|o|m|e| |m|o|r|e| |t|e|x|t| @60
+++ /dev/null
-|s+0&#ffffff0|o|m|e| >t|e|x|t| @65
-|~+0#4040ff13&| @73
-|═+0#e000002&@74
-|s|o|m|e| |t|e|x|t| @65
-|s|o|m|e| |m|o|r|e| |t|e|x|t| @60
-|e|v|e|n| |m|o|r|e| |t|e|x|t| @60
" Two lists with values: values that work and values that fail.
" When not listed, "othernum" or "otherstring" is used.
let test_values = {
- \ 'cmdheight': [[0, 1, 2, 10], [-1]],
+ \ 'cmdheight': [[1, 2, 10], [-1, 0]],
\ 'cmdwinheight': [[1, 2, 10], [-1, 0]],
\ 'columns': [[12, 80], [-1, 0, 10]],
\ 'conceallevel': [[0, 1, 2, 3], [-1, 4, 99]],
call delete('b.txt')
endfunc
-func Test_cmdheight_zero()
- enew
- set cmdheight=0
- set showcmd
- redraw!
- let using_popupwin = has('timers') && has('popupwin')
-
- echo 'test echo'
- if using_popupwin
- redraw
- call assert_equal('test echo', Screenline(&lines))
-
- " check that the popup is cleared when entering a command line
- call feedkeys(':', 'xt')
- redraw
- call assert_equal('~', Screenline(&lines))
- else
- call assert_equal(116, screenchar(&lines, 1))
- endif
- redraw!
-
- echomsg 'test echomsg'
- if using_popupwin
- redraw
- call assert_equal('test echomsg', Screenline(&lines))
- else
- call assert_equal(116, screenchar(&lines, 1))
- endif
- redraw!
-
- if !using_popupwin
- call feedkeys(":ls\<CR>", "xt")
- call assert_equal(':ls', Screenline(&lines))
- redraw!
- endif
-
- let char = getchar(0)
- call assert_match(char, 0)
-
- " Check change/restore cmdheight when macro
- call feedkeys("qa", "xt")
- call assert_equal(1, &cmdheight)
- call feedkeys("q", "xt")
- call assert_equal(0, &cmdheight)
-
- call setline(1, 'somestring')
- call feedkeys("y", "n")
- %s/somestring/otherstring/gc
- call assert_equal('otherstring', getline(1))
-
- call feedkeys("g\<C-g>", "xt")
- if using_popupwin
- redraw
- endif
- call assert_match(
- \ 'Col 1 of 11; Line 1 of 1; Word 1 of 1',
- \ Screenline(&lines))
-
- " Check split behavior
- for i in range(1, 10)
- split
- endfor
- only
- call assert_equal(0, &cmdheight)
-
- " Check that pressing ":" should not scroll a window
- " Check for what patch 9.0.0115 fixes
- botright 10new
- call setline(1, range(12))
- 7
- call feedkeys(":\"\<C-R>=line('w0')\<CR>\<CR>", "xt")
- call assert_equal('"1', @:)
-
- bwipe!
- bwipe!
- set cmdheight&
- set showcmd&
- tabnew
- tabonly
-
- "redraw to hide the popup window
- redraw
-endfunc
-
-func Test_cmdheight_zero_dump()
- CheckScreendump
-
- let lines =<< trim END
- set cmdheight=0
- set showmode
- call setline(1, 'some text')
- func ShowMessages()
- echomsg 'some text'
- sleep 100m
- echomsg 'some more text'
- sleep 2500m
- echomsg 'even more text'
- endfunc
- END
- call writefile(lines, 'XtestCmdheight')
- let buf = RunVimInTerminal('-S XtestCmdheight', #{rows: 6})
- " The "-- INSERT --" indicator should not be visible.
- call term_sendkeys(buf, "i")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_1', {})
-
- " The "-- VISUAL --" indicator should not be visible.
- call term_sendkeys(buf, "\<Esc>vw")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_2', {})
-
- " Echo'd text is in a popup window
- call term_sendkeys(buf, "\<Esc>:echo 'message window'\<CR>")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_3', {})
-
- " Message for CTRL-C is in the popup window
- call term_sendkeys(buf, "\<C-C>")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_4', {})
-
- " file write message is one line
- call term_sendkeys(buf, ":w XsomeText\<CR>")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_5', {})
-
- call term_sendkeys(buf, ":call popup_clear()\<CR>")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_6', {})
-
- call term_sendkeys(buf, ":call ShowMessages()\<CR>")
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_7', {})
- sleep 2
- call VerifyScreenDump(buf, 'Test_cmdheight_zero_8', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestCmdheight')
- call delete('XsomeText')
-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
-
func Test_echowindow()
CheckScreendump
call assert_equal(h0, winheight(0))
call assert_equal(1, &cmdheight)
endfor
- " supports cmdheight=0
- set cmdheight=0
call assert_true(win_move_statusline(0, 1))
- call assert_equal(h0 + 1, winheight(0))
- call assert_equal(0, &cmdheight)
- set cmdheight&
+ call assert_equal(h0, winheight(0))
+ call assert_equal(1, &cmdheight)
" check win_move_statusline from bottom window on top window ID
let id = win_getid(1)
for offset in range(5)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 340,
/**/
339,
/**/
needed = wmh1 + STATUS_HEIGHT;
if (flags & WSP_ROOM)
needed += p_wh - wmh1;
- if (p_ch == 0)
- needed += 1; // Adjust for cmdheight=0.
if (flags & (WSP_BOT | WSP_TOP))
{
minheight = frame_minheight(topframe, NOWIN) + need_status;
{
// topframe: can only change the command line height
if (height > ROWS_AVAIL)
- // If height is greater than the available space, try to create
- // space for the frame by reducing 'cmdheight' if possible.
height = ROWS_AVAIL;
if (height > 0)
frame_new_height(curfrp, height, FALSE, FALSE);
while (p_wmh > 0)
{
room = Rows - p_ch;
- needed = min_rows();
+ needed = min_rows() - 1; // 1 was added for the cmdline
if (room >= needed)
break;
--p_wmh;
int row;
int up; // if TRUE, drag status line up, otherwise down
int n;
- static int p_ch_was_zero = FALSE;
-
- // If the user explicitly set 'cmdheight' to zero, then allow for dragging
- // the status line making it zero again.
- if (p_ch == 0)
- p_ch_was_zero = TRUE;
fr = dragwin->w_frame;
curfr = fr;
* Only dragging the last status line can reduce p_ch.
*/
room = Rows - cmdline_row;
- if (curfr->fr_next != NULL)
- room -= p_ch;
- else if (!p_ch_was_zero)
+ if (curfr->fr_next == NULL)
--room;
+ else
+ room -= p_ch;
if (room < 0)
room = 0;
// sum up the room of frames below of the current one
row = win_comp_pos();
screen_fill(row, cmdline_row, 0, (int)Columns, ' ', ' ', 0);
cmdline_row = row;
- p_ch = MAX(Rows - cmdline_row, p_ch_was_zero ? 0 : 1);
+ p_ch = MAX(Rows - cmdline_row, 1);
curtab->tp_ch_used = p_ch;
+
redraw_all_later(UPD_SOME_VALID);
showmode();
}
// There is no point in adjusting the scroll position when exiting. Some
// values might be invalid.
- // Skip scroll_to_fraction() when 'cmdheight' was set to one from zero.
- if (!exiting && !made_cmdheight_nonzero)
+ if (!exiting)
scroll_to_fraction(wp, prev_height);
}
// Recompute window positions.
if (frp != lastwin->w_frame)
(void)win_comp_pos();
-
-#ifdef HAS_MESSAGE_WINDOW
- if (p_ch > 0)
- popup_close_message_win();
-#endif
}
/*
total = n;
}
total += tabline_height();
- if (p_ch > 0)
- total += 1; // count the room for the command line
+ total += 1; // count the room for the command line
return total;
}