mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
Problem: possible crash with winminheight=0
(Emilien Breton)
Solution: Use <= instead of < when checking reserved room in
frame_setheight() to correctly handle the zero-height
boundary case (Hirohito Higashi).
In frame_setheight(), when shrinking the current window and the only
other window has 'winfixheight' with 'winminheight'=0, room_reserved
was not cleared because the condition used '<' instead of '<='.
The freed rows were discarded, leaving fr_height sum less than
topframe fr_height. Subsequent resize operations then computed a
wrong room_cmdline that expanded topframe beyond the screen, causing
a crash.
fixes: vim/vim#19706
closes: vim/vim#19712
a5d9654620
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>