]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0115: popup: screen flickering possible during async callbacks v9.2.0115
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sat, 7 Mar 2026 10:22:28 +0000 (10:22 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 7 Mar 2026 10:22:28 +0000 (10:22 +0000)
Problem:  popup: When an async redraw is triggered, the screen may flicker
          because the terminal may render the intermediate states of the
          redraw.
Solution: Enable synchronized output if possible to ensure the terminal
          renders the entire update at once (Yasuhiro Matsumoto).

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

index bdaaaf0be26ae8653d5d992985353aa69e324211..68ba60572ca437ead1c62380528e6d1d69755889 100644 (file)
@@ -3167,6 +3167,8 @@ redraw_after_callback(int call_update_screen, int do_message)
 {
     ++redrawing_for_callback;
 
+    term_set_sync_output(TERM_SYNC_OUTPUT_ENABLE);
+
     if (State == MODE_HITRETURN || State == MODE_ASKMORE
            || State == MODE_SETWSIZE || State == MODE_EXTERNCMD
            || State == MODE_CONFIRM || exmode_active)
@@ -3211,6 +3213,7 @@ redraw_after_callback(int call_update_screen, int do_message)
        }
     }
     cursor_on();
+    term_set_sync_output(TERM_SYNC_OUTPUT_DISABLE);
 #ifdef FEAT_GUI
     if (gui.in_use && !gui_mch_is_blink_off())
        // Don't update the cursor when it is blinking and off to avoid
index 6c37163dc85f21e0c3980208e1cbdf1c40a84b57..d083d0c05bdc71866a17d2eb3920cc750a11db87 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    115,
 /**/
     114,
 /**/