]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0116: terminal: synchronized output sequences are buffered v9.2.0116
authorFoxe Chen <chen.foxe@gmail.com>
Sat, 7 Mar 2026 14:23:27 +0000 (14:23 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 7 Mar 2026 14:23:27 +0000 (14:23 +0000)
Problem:  terminal: synchronized output sequences are buffered
Solution: Output the terminal sequences directly using ui_write(),
          bypassing buffering (Foxe Chen).

closes: #19597

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

index 5e8b0945c4c753a73db268b18581c9d705e347b0..5c3212b269edfb84979c292bd5faab2b920ec0c9 100644 (file)
@@ -7902,8 +7902,8 @@ term_set_sync_output(int flags)
        if (allowed && !in_gui && sync_output_state > 0 && *T_ESU != NUL &&
                *T_BSU != NUL)
        {
-           out_str((char_u *)T_ESU);
-           out_str((char_u *)T_BSU);
+           ui_write((char_u *)T_ESU, (int)STRLEN(T_ESU), true);
+           ui_write((char_u *)T_BSU, (int)STRLEN(T_BSU), true);
        }
        return;
     }
@@ -7913,7 +7913,7 @@ term_set_sync_output(int flags)
     {
        if (sync_output_state > 0 && *T_ESU != NUL)
        {
-           out_str((char_u *)T_ESU);
+           ui_write((char_u *)T_ESU, (int)STRLEN(T_ESU), true);
            sync_output_state = 0;
        }
        return;
@@ -7942,5 +7942,6 @@ term_set_sync_output(int flags)
        return;
     }
 
-    out_str((char_u *)str);
+    // Directly write to terminal instead of using output buffer
+    ui_write((char_u *)str, (int)STRLEN(str), true);
 }
index d083d0c05bdc71866a17d2eb3920cc750a11db87..d0c530a1875dd5020bfb0e2150533493a3421011 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    116,
 /**/
     115,
 /**/