ui_compositior: handle multiple displayed floats in the same tick

problem: the order of non-focuesed float opened before focused float is wrong (sunjon)
solution: check curwin and correct the order (bfredl)
This commit is contained in:
Björn Linse
2021-04-21 10:55:54 +02:00
parent bb7d3790bf
commit eeb1099bc4
3 changed files with 213 additions and 3 deletions

View File

@@ -180,7 +180,8 @@ bool ui_comp_put_grid(ScreenGrid *grid, int row, int col, int height, int width,
if (kv_A(layers, insert_at-1) == &pum_grid && (grid != &msg_grid)) {
insert_at--;
}
if (insert_at > 1 && !on_top) {
if (curwin && kv_A(layers, insert_at-1) == &curwin->w_grid_alloc
&& !on_top) {
insert_at--;
}
// not found: new grid