aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-03-27 12:52:46 +0100
committerGitHub <noreply@github.com>2025-03-27 12:52:46 +0100
commit703f4037c475ee504b71d393e152fb1ae44c7bb9 (patch)
tree6406ea605954cc7a92e1e6c5887143ebc2cdb46d /src
parentce0c0c31a08975dd2e34207afb1a2cd544775bad (diff)
downloadrneovim-703f4037c475ee504b71d393e152fb1ae44c7bb9.tar.gz
rneovim-703f4037c475ee504b71d393e152fb1ae44c7bb9.tar.bz2
rneovim-703f4037c475ee504b71d393e152fb1ae44c7bb9.zip
fix(ui): wincmd _ should not increase 'cmdheight' above 0 (#33056)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index dd351a6af7..916c193469 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -196,6 +196,10 @@ win_T *swbuf_goto_win_with_buf(buf_T *buf)
return wp;
}
+// 'cmdheight' value explicitly set by the user: window commands are allowed to
+// resize the topframe to values higher than this minimum, but not lower.
+static OptInt min_set_ch = 1;
+
/// all CTRL-W window commands are handled here, called from normal_cmd().
///
/// @param xchar extra char from ":wincmd gx" or NUL
@@ -513,7 +517,7 @@ newwindow:
// set current window height
case Ctrl__:
case '_':
- win_setheight(Prenum ? Prenum : Rows - 1);
+ win_setheight(Prenum ? Prenum : Rows - (int)min_set_ch);
break;
// increase current window width
@@ -3505,10 +3509,6 @@ static bool is_bottom_win(win_T *wp)
return true;
}
-// 'cmdheight' value explicitly set by the user: window commands are allowed to
-// resize the topframe to values higher than this minimum, but not lower.
-static OptInt min_set_ch = 1;
-
/// Set a new height for a frame. Recursively sets the height for contained
/// frames and windows. Caller must take care of positions.
///