mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 19:45:02 +00:00
fix(float): clamp floating window above cmdline #37899
Problem: A float whose zindex is below the cmdline can be enlarged and
end up behind the cmdline.
Solution: Clamp height of such windows to not extend beyond 'cmdheight'.
This commit is contained in:
@@ -239,7 +239,8 @@ void win_config_float(win_T *wp, WinConfig fconfig)
|
||||
}
|
||||
|
||||
if (!ui_has(kUIMultigrid)) {
|
||||
wp->w_height = MIN(wp->w_height, Rows - win_border_height(wp));
|
||||
int above_ch = wp->w_config.zindex < kZIndexMessages ? (int)p_ch : 0;
|
||||
wp->w_height = MIN(wp->w_height, Rows - win_border_height(wp) - above_ch);
|
||||
wp->w_width = MIN(wp->w_width, Columns - win_border_width(wp));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user