diff options
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 7c81110ae9..51815c36e1 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -6,7 +6,6 @@ #include <string.h> #include <uv.h> -#include "klib/kvec.h" #include "nvim/api/private/helpers.h" #include "nvim/api/private/validate.h" #include "nvim/api/ui.h" @@ -224,10 +223,10 @@ void ui_refresh(void) // Reset 'cmdheight' for all tabpages when ext_messages toggles. if (had_message != ui_ext[kUIMessages]) { set_option_value(kOptCmdheight, NUMBER_OPTVAL(had_message), 0); - command_height(); FOR_ALL_TABS(tp) { tp->tp_ch_used = had_message; } + msg_scroll_flush(); } if (!ui_active()) { @@ -325,7 +324,7 @@ void ui_busy_stop(void) /// Emit a bell or visualbell as a warning /// -/// val is one of the BO_ values, e.g., BO_OPER +/// val is one of the OptBoFlags values, e.g., kOptBoFlagOperator void vim_beep(unsigned val) { called_vim_beep = true; @@ -334,7 +333,7 @@ void vim_beep(unsigned val) return; } - if (!((bo_flags & val) || (bo_flags & BO_ALL))) { + if (!((bo_flags & val) || (bo_flags & kOptBoFlagAll))) { static int beeps = 0; static uint64_t start_time = 0; @@ -477,7 +476,7 @@ void ui_line(ScreenGrid *grid, int row, bool invalid_row, int startcol, int endc (const sattr_T *)grid->attrs + off); // 'writedelay': flush & delay each time. - if (p_wd && (rdb_flags & RDB_LINE)) { + if (p_wd && (rdb_flags & kOptRdbFlagLine)) { // If 'writedelay' is active, set the cursor to indicate what was drawn. ui_call_grid_cursor_goto(grid->handle, row, MIN(clearcol, (int)grid->cols - 1)); @@ -564,7 +563,7 @@ void ui_flush(void) } ui_call_flush(); - if (p_wd && (rdb_flags & RDB_FLUSH)) { + if (p_wd && (rdb_flags & kOptRdbFlagFlush)) { os_sleep((uint64_t)llabs(p_wd)); } } @@ -718,10 +717,10 @@ void ui_call_event(char *name, bool fast, Array args) bool handled = false; UIEventCallback *event_cb; - // Prompt messages should be shown immediately so must be safe + // Return prompt is still a non-fast event, other prompt messages are + // followed by a "cmdline_show" event. if (strcmp(name, "msg_show") == 0) { - char *kind = args.items[0].data.string.data; - fast = !kind || (strncmp(kind, "confirm", 7) != 0 && strcmp(kind, "return_prompt") != 0); + fast = !strequal(args.items[0].data.string.data, "return_prompt"); } map_foreach(&ui_event_cbs, ui_event_ns_id, event_cb, { |