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:
luukvbaal
2026-02-16 15:33:32 +01:00
committed by GitHub
parent 249f305bbc
commit d131d67e67
2 changed files with 92 additions and 7 deletions

View File

@@ -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));
}