diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-04-01 14:02:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 05:02:24 -0700 |
commit | 0e7479bb7637a21121b990cc960262a0d60196da (patch) | |
tree | 12803bbc13c6726677ea31b98e8363666c00284e /src | |
parent | ec6670080a71835a54e28a0f5489b0fad5f4e531 (diff) | |
download | rneovim-0e7479bb7637a21121b990cc960262a0d60196da.tar.gz rneovim-0e7479bb7637a21121b990cc960262a0d60196da.tar.bz2 rneovim-0e7479bb7637a21121b990cc960262a0d60196da.zip |
fix(window): crash on negative window height with 'winbar' #33250
Problem: Negative window and grid height with 'winbar'.
Solution: Clamp the height when subtracting the 'winbar' height.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 916c193469..3022dccb1c 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6634,7 +6634,7 @@ void win_set_inner_size(win_T *wp, bool valid_cursor) int prev_height = wp->w_height_inner; int height = wp->w_height_request; if (height == 0) { - height = wp->w_height - wp->w_winbar_height; + height = MAX(0, wp->w_height - wp->w_winbar_height); } if (height != prev_height) { |