mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
fix: correct vertical dragging room calculation with global statusline (#17928)
This fixes the bug that win_move_statusline() or mouse dragging cannot reduce 'cmdheight' to 1 when global statusline is used.
This commit is contained in:
@@ -5857,11 +5857,11 @@ void win_drag_status_line(win_T *dragwin, int offset)
|
||||
} else { // drag down
|
||||
up = false;
|
||||
// Only dragging the last status line can reduce p_ch.
|
||||
room = Rows - cmdline_row - global_stl_height();
|
||||
room = Rows - cmdline_row;
|
||||
if (curfr->fr_next == NULL) {
|
||||
room -= 1;
|
||||
} else {
|
||||
room -= p_ch;
|
||||
room -= p_ch + global_stl_height();
|
||||
}
|
||||
if (room < 0) {
|
||||
room = 0;
|
||||
|
Reference in New Issue
Block a user