aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2022-12-31 00:35:11 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2022-12-31 00:50:39 +0100
commit935e538b632ba3cb041fb846d2254d92ef981e71 (patch)
tree553c2d52ffdb4a940c973e5287d31ea74ef5c966
parentb102bf22c009d3543f71d9d21c1252b54f5d4a54 (diff)
downloadrneovim-935e538b632ba3cb041fb846d2254d92ef981e71.tar.gz
rneovim-935e538b632ba3cb041fb846d2254d92ef981e71.tar.bz2
rneovim-935e538b632ba3cb041fb846d2254d92ef981e71.zip
fix: issues with command line if ui elements are externalized
Resolve https://github.com/neovim/neovim/issues/20888 and handle side effects for setting 'cmdheight' to zero.
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/ui.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 97f4c6261b..c94ac409f2 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3841,7 +3841,7 @@ void compute_cmdrow(void)
cmdline_row = wp->w_winrow + wp->w_height
+ wp->w_hsep_height + wp->w_status_height + global_stl_height();
}
- if (cmdline_row == Rows) {
+ if (cmdline_row == Rows && p_ch > 0) {
cmdline_row--;
}
lines_left = cmdline_row;
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 7bde8d2f5a..7a22acfc8b 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -235,7 +235,7 @@ void ui_refresh(void)
}
if (ext_widgets[kUIMessages]) {
- p_ch = 0;
+ set_option_value("cmdheight", 0L, NULL, 0);
command_height();
}
ui_mode_info_set();