From 0d4bd420c19e3a81b494ec1f58cffde53d9b84ea Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 31 Mar 2022 08:40:17 +0800 Subject: 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. --- src/nvim/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index 6bd2ef3ef6..632e9b3f44 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -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; -- cgit