mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
cmdheight=0: fix bugs #18961
Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
This commit is contained in:
@@ -3651,6 +3651,13 @@ static int do_sub(exarg_T *eap, proftime_T timeout, long cmdpreview_ns, handle_T
|
||||
sub_needs_free = cmdpreview && sub != source;
|
||||
}
|
||||
|
||||
bool cmdheight0 = p_ch < 1 && !ui_has(kUIMessages);
|
||||
if (cmdheight0) {
|
||||
// If cmdheight is 0, cmdheight must be set to 1 when we enter command line.
|
||||
set_option_value("ch", 1L, NULL, 0);
|
||||
redraw_statuslines();
|
||||
}
|
||||
|
||||
// Check for a match on each line.
|
||||
// If preview: limit to max('cmdwinheight', viewport).
|
||||
linenr_T line2 = eap->line2;
|
||||
@@ -4461,6 +4468,11 @@ skip:
|
||||
}
|
||||
}
|
||||
|
||||
if (cmdheight0) {
|
||||
// Restore cmdheight
|
||||
set_option_value("ch", 0L, NULL, 0);
|
||||
}
|
||||
|
||||
kv_destroy(preview_lines.subresults);
|
||||
return retv;
|
||||
#undef ADJUST_SUB_FIRSTLNUM
|
||||
|
Reference in New Issue
Block a user