From cb2ca54331cdd089a6f018a933c6fc2be7f417d3 Mon Sep 17 00:00:00 2001 From: Shougo Date: Sun, 4 May 2025 21:53:25 +0900 Subject: [PATCH] fix(display): cursor moves when searching with "n", "*" #29446 Problem: When searching for the next pattern via n/N/*/#, cursor moves to cmdline, perceived as "flicker". Solution: Can ui_busy_start() and ui_busy_stop(). --- src/nvim/search.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvim/search.c b/src/nvim/search.c index 754e22c77d..2fa343b759 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -1264,6 +1264,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, size_t patlen // do not fill the msgbuf buffer, if cmd_silent is set, leave it // empty for the search_stat feature. if (!cmd_silent) { + ui_busy_start(); msgbuf[0] = (char)dirc; if (utf_iscomposing_first(utf_ptr2char(p))) { // Use a space to draw the composing char on. @@ -1310,6 +1311,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, size_t patlen gotocmdline(false); ui_flush(); + ui_busy_stop(); msg_nowait = true; // don't wait for this message }