]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0150: synchronized terminal update may cause display artifacts v9.2.0150
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 13 Mar 2026 17:08:17 +0000 (17:08 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 13 Mar 2026 17:08:17 +0000 (17:08 +0000)
Problem:  When using synchronized terminal output, the internal
          output buffer  is not flushed before sending the
          End Synchronized Update (ESU) sequence. This causes
          redrawing artifacts.
Solution: Call out_flush() immediately before sending the ESU
          sequence to ensure all pending drawing commands are
          contained within the synchronized update window.
          (Yasuhiro Matsumoto)

closes: #19662

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

index e00531d4afb30768a06f9609531e8a92515f978a..8b557ae9927cf8de98ef6681352119e4a4fd7e15 100644 (file)
@@ -8056,6 +8056,11 @@ term_set_sync_output(int flags)
     {
        if (sync_output_state == 0 || --sync_output_state > 0)
            return;
+       // Flush the output buffer before ending the sync batch so that
+       // all drawing output is sent to the terminal within the
+       // BSU..ESU window.  Without this, the drawing data remaining in
+       // out_buf would be sent after ESU, outside the sync batch.
+       out_flush();
        str = T_ESU;
     }
     else
index 762553cd582ab5707691342520d56a4ed257fec2..37ef83b978878b50c7fc9808f2626498394e8a17 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    150,
 /**/
     149,
 /**/