]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0340: pum_redraw() may cause flicker v9.2.0340
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sun, 12 Apr 2026 16:24:09 +0000 (16:24 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 12 Apr 2026 16:24:09 +0000 (16:24 +0000)
Problem:  pum_redraw() may cause flicker
Solution: Wrap pum_redraw() in synchronized output to avoid flicker
          (Yasuhiro Matsumoto)

closes: #19955

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

index 2ee720087d1686a6180ab3cbc5b972c456bb988d..a50faaa05b4d4bc9b120da4523f56bf4e102f180 100644 (file)
@@ -953,6 +953,10 @@ pum_redraw(void)
     // Use current window for highlight overrides when using 'winhighlight'
     override_success = push_highlight_overrides(curwin->w_hl, curwin->w_hl_len);
 
+    // Batch the underlying screen update and the pum drawing into a single
+    // synchronized output frame to avoid flicker.
+    term_set_sync_output(TERM_SYNC_OUTPUT_ENABLE);
+
     hlf_T      hlfsNorm[3];
     hlf_T      hlfsSel[3];
     // "word"/"abbr"
@@ -1187,6 +1191,8 @@ pum_redraw(void)
 
     if (override_success)
        pop_highlight_overrides();
+
+    term_set_sync_output(TERM_SYNC_OUTPUT_DISABLE);
 }
 
 #if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
index fc4876381940633d321fd78ae9cce01ee635adb5..560233fafc0154f5901e324156960c59f40a7533 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    340,
 /**/
     339,
 /**/