diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-04-27 06:37:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-27 06:37:40 -0700 |
commit | 158e3297255cc82b2830e08d2067948cc4a8521f (patch) | |
tree | 774522b0db9f03a9b464a63a2928c46b46b6c7b8 /src/nvim/ui.c | |
parent | 499070148d8020e1da21b137a94d0aa31a5b65f4 (diff) | |
parent | b8c1b36061f443f82f34f3d4fe7807fc33edefa6 (diff) | |
download | rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.tar.gz rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.tar.bz2 rneovim-158e3297255cc82b2830e08d2067948cc4a8521f.zip |
Merge #28522 handle ui_attach side effects
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 75af543448..27458d588b 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -194,15 +194,6 @@ void ui_refresh(void) abort(); } - if (!ui_active()) { - return; - } - - if (updating_screen) { - ui_schedule_refresh(); - return; - } - int width = INT_MAX; int height = INT_MAX; bool ext_widgets[kUIExtCount]; @@ -227,18 +218,29 @@ void ui_refresh(void) if (i < kUIGlobalCount) { ext_widgets[i] |= ui_cb_ext[i]; } - // Set 'cmdheight' to zero when ext_messages becomes active. + // Set 'cmdheight' to zero when ext_messages becomes active for all tabpages. if (i == kUIMessages && !ui_ext[i] && ext_widgets[i]) { set_option_value(kOptCmdheight, NUMBER_OPTVAL(0), 0); command_height(); + FOR_ALL_TABS(tp) { + tp->tp_ch_used = 0; + } } ui_ext[i] = ext_widgets[i]; if (i < kUIGlobalCount) { - ui_call_option_set(cstr_as_string(ui_ext_names[i]), - BOOLEAN_OBJ(ext_widgets[i])); + ui_call_option_set(cstr_as_string(ui_ext_names[i]), BOOLEAN_OBJ(ext_widgets[i])); } } + if (!ui_active()) { + return; + } + + if (updating_screen) { + ui_schedule_refresh(); + return; + } + ui_default_colors_set(); int save_p_lz = p_lz; |