]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0424: popup: flicker when wildtrigger() refreshes the popup menu v9.2.0424
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 1 May 2026 13:29:01 +0000 (13:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 1 May 2026 13:29:01 +0000 (13:29 +0000)
Problem:  popup: flicker when wildtrigger() refreshes the popup menu
Solution: Wrap the pum teardown and cmdline redraw in synchronized
          terminal output (Yasuhiro Matsumoto).

Reduces flicker when wildtrigger() refreshes the popup on every
keystroke and the cmdline is wrapped: the un-scroll inside
update_screen() and the re-scroll inside redrawcmd() are emitted as
one atomic terminal update.

closes: #20081

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cmdexpand.c
src/version.c

index b7a17bbdda1ce3c6a093293219ebd608d38db353..a4891871f612dc48cbc55f94f1a1a640552a50b5 100644 (file)
@@ -465,6 +465,7 @@ cmdline_pum_remove(cmdline_info_T *cclp UNUSED, int defer_redraw)
        RedrawingDisabled = 0;
 #endif
 
+    term_set_sync_output(TERM_SYNC_OUTPUT_ENABLE);
     pum_undisplay();
     VIM_CLEAR(compl_match_array);
     compl_match_arraysize = 0;
@@ -478,6 +479,7 @@ cmdline_pum_remove(cmdline_info_T *cclp UNUSED, int defer_redraw)
     else
        pum_call_update_screen();
     redrawcmd();
+    term_set_sync_output(TERM_SYNC_OUTPUT_DISABLE);
 
     // When a function is called (e.g. for 'foldtext') KeyTyped might be reset
     // as a side effect.
index dca5176357053c9b4144ddc57a262d2300bb8555..837b453d10c2536ba4e6e7cb213fbfe8cd0e9525 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    424,
 /**/
     423,
 /**/