diff options
Diffstat (limited to 'src/nvim/winfloat.c')
-rw-r--r-- | src/nvim/winfloat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/winfloat.c b/src/nvim/winfloat.c index 1d22590ac0..1c9eb4ec5c 100644 --- a/src/nvim/winfloat.c +++ b/src/nvim/winfloat.c @@ -38,7 +38,7 @@ /// @param last make the window the last one in the window list. /// Only used when allocating the autocommand window. /// @param config must already have been validated! -win_T *win_new_float(win_T *wp, bool last, FloatConfig fconfig, Error *err) +win_T *win_new_float(win_T *wp, bool last, WinConfig fconfig, Error *err) { if (wp == NULL) { wp = win_alloc(last ? lastwin : lastwin_nofloating(), false); @@ -138,7 +138,7 @@ int win_border_width(win_T *wp) return wp->w_border_adj[1] + wp->w_border_adj[3]; } -void win_config_float(win_T *wp, FloatConfig fconfig) +void win_config_float(win_T *wp, WinConfig fconfig) { wp->w_width = MAX(fconfig.width, 1); wp->w_height = MAX(fconfig.height, 1); @@ -233,7 +233,9 @@ void win_config_float(win_T *wp, FloatConfig fconfig) static int float_zindex_cmp(const void *a, const void *b) { - return (*(win_T **)b)->w_float_config.zindex - (*(win_T **)a)->w_float_config.zindex; + int za = (*(win_T **)a)->w_float_config.zindex; + int zb = (*(win_T **)b)->w_float_config.zindex; + return za == zb ? 0 : za < zb ? 1 : -1; } void win_float_remove(bool bang, int count) |