fix(ui2): don't draw MsgSeparator if cmdheight=0 #41531

Problem:
When 'cmdheight' is 0, the MsgSeparator can obscure the statusline when
a message is displayed, making its contents disappear until
the next redraw.

Solution:
Skip the separator when 'cmdheight=0' available.
This commit is contained in:
not_compiled authored and GitHub committed 2026-08-29 11:22:37 -04:00
1 parent ab707262b1
commit fbc5a769aa
2 files changed
+15 -5

No files matched your search

+1 -1
View File
@@ -672,7 +672,7 @@ local function win_row_height_border(tgt, min)
if tgt ~= 'pager' then
return (tgt == 'msg' and 0 or 1) - ui.cmd.wmnumode,
math.max(1, min),
min < o.lines - ui.cmdheight
min < o.lines - ui.cmdheight and ui.cmdheight > 0
end
local cmdwin_win = require('vim._core.cmdwin').win()
local cmdwin = cmdwin_win and api.nvim_win_get_height(cmdwin_win) or 0