mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
fix(float): allow floating window in cmdline area
Problem: Floats are arbitrarily positioned at 1 row above screen size. Solution: Position at 1 row above 'cmdheight', only if window is hidden behind the message area.
This commit is contained in:
@@ -817,9 +817,10 @@ void ui_ext_win_position(win_T *wp, bool validate)
|
||||
|
||||
int comp_row = (int)row - (south ? wp->w_height_outer : 0);
|
||||
int comp_col = (int)col - (east ? wp->w_width_outer : 0);
|
||||
int above_ch = wp->w_config.zindex < kZIndexMessages ? (int)p_ch : 0;
|
||||
comp_row += grid->comp_row;
|
||||
comp_col += grid->comp_col;
|
||||
comp_row = MAX(MIN(comp_row, Rows - wp->w_height_outer - (p_ch > 0 ? 1 : 0)), 0);
|
||||
comp_row = MAX(MIN(comp_row, Rows - wp->w_height_outer - above_ch), 0);
|
||||
if (!c.fixed || east) {
|
||||
comp_col = MAX(MIN(comp_col, Columns - wp->w_width_outer), 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user