Skip to content

Commit 7ba60f1

Browse files
64-bitmanchrisbra
authored andcommitted
patch 9.2.0110: No support for terminal synchronization mode
Problem: No support for terminal synchronization mode Solution: Add DEC 2026 support using the 'termsync' option (Foxe Chen). related: #11718 closes: #19541 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 6c34ace commit 7ba60f1

File tree

23 files changed

+257
-20
lines changed

23 files changed

+257
-20
lines changed

runtime/doc/options.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.2. Last change: 2026 Mar 02
1+
*options.txt* For Vim version 9.2. Last change: 2026 Mar 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -9096,6 +9096,24 @@ A jump table for the options with a short description can be found at |Q_op|.
90969096
<
90979097
NOTE: This option is reset when 'compatible' is set.
90989098

9099+
*'termsync'* *'tsy'*
9100+
'termsync' 'tsy' boolean (default off)
9101+
global
9102+
If the host terminal supports it, buffer all screen updates made
9103+
during a redraw cycle so that each screen is displayed in the terminal
9104+
all at once. This can prevent tearing or flickering when the terminal
9105+
updates faster than Vim can redraw. If the host terminal does not
9106+
support it or if Vim is running graphically, then this option does
9107+
nothing.
9108+
9109+
The specification can be found at:
9110+
https://github.com/contour-terminal/vt-extensions/blob/master/synchronized-output.md
9111+
9112+
Vim may set this option automatically at startup time when Vim is
9113+
compiled with the |+termresponse| feature, by querying the terminal
9114+
for DEC mode 2026 support. The terminal codes used are |t_BS| and
9115+
|t_ES|.
9116+
90999117
*'termwinkey'* *'twk'*
91009118
'termwinkey' 'twk' string (default "")
91019119
local to window

runtime/doc/quickref.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*quickref.txt* For Vim version 9.2. Last change: 2026 Mar 02
1+
*quickref.txt* For Vim version 9.2. Last change: 2026 Mar 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -963,6 +963,7 @@ Short explanation of each option: *option-list*
963963
'termbidi' 'tbidi' terminal takes care of bi-directionality
964964
'termencoding' 'tenc' character encoding used by the terminal
965965
'termguicolors' 'tgc' use GUI colors for the terminal
966+
'termsync' 'tsy' enable terminal sync mode for redraw
966967
'termwinkey' 'twk' key that precedes a Vim command in a terminal
967968
'termwinscroll' 'twsl' max number of scrollback lines in a terminal window
968969
'termwinsize' 'tws' size of a terminal window

runtime/doc/tags

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ $quote eval.txt /*$quote*
10711071
't_AU' term.txt /*'t_AU'*
10721072
't_BD' term.txt /*'t_BD'*
10731073
't_BE' term.txt /*'t_BE'*
1074+
't_BS' term.txt /*'t_BS'*
10741075
't_CF' term.txt /*'t_CF'*
10751076
't_CS' term.txt /*'t_CS'*
10761077
't_CV' term.txt /*'t_CV'*
@@ -1081,6 +1082,7 @@ $quote eval.txt /*$quote*
10811082
't_Ds' term.txt /*'t_Ds'*
10821083
't_EC' term.txt /*'t_EC'*
10831084
't_EI' term.txt /*'t_EI'*
1085+
't_ES' term.txt /*'t_ES'*
10841086
't_F1' term.txt /*'t_F1'*
10851087
't_F2' term.txt /*'t_F2'*
10861088
't_F3' term.txt /*'t_F3'*
@@ -1235,6 +1237,7 @@ $quote eval.txt /*$quote*
12351237
'termbidi' options.txt /*'termbidi'*
12361238
'termencoding' options.txt /*'termencoding'*
12371239
'termguicolors' options.txt /*'termguicolors'*
1240+
'termsync' options.txt /*'termsync'*
12381241
'termwinkey' options.txt /*'termwinkey'*
12391242
'termwinscroll' options.txt /*'termwinscroll'*
12401243
'termwinsize' options.txt /*'termwinsize'*
@@ -1270,6 +1273,7 @@ $quote eval.txt /*$quote*
12701273
'tsl' options.txt /*'tsl'*
12711274
'tsr' options.txt /*'tsr'*
12721275
'tsrfu' options.txt /*'tsrfu'*
1276+
'tsy' options.txt /*'tsy'*
12731277
'ttimeout' options.txt /*'ttimeout'*
12741278
'ttimeoutlen' options.txt /*'ttimeoutlen'*
12751279
'ttm' options.txt /*'ttm'*
@@ -10654,6 +10658,7 @@ t_AL term.txt /*t_AL*
1065410658
t_AU term.txt /*t_AU*
1065510659
t_BD term.txt /*t_BD*
1065610660
t_BE term.txt /*t_BE*
10661+
t_BS term.txt /*t_BS*
1065710662
t_CF term.txt /*t_CF*
1065810663
t_CS term.txt /*t_CS*
1065910664
t_CTRL-W_. terminal.txt /*t_CTRL-W_.*
@@ -10673,6 +10678,7 @@ t_DL term.txt /*t_DL*
1067310678
t_Ds term.txt /*t_Ds*
1067410679
t_EC term.txt /*t_EC*
1067510680
t_EI term.txt /*t_EI*
10681+
t_ES term.txt /*t_ES*
1067610682
t_F1 term.txt /*t_F1*
1067710683
t_F2 term.txt /*t_F2*
1067810684
t_F3 term.txt /*t_F3*

runtime/doc/term.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim version 9.2. Last change: 2026 Feb 14
1+
*term.txt* For Vim version 9.2. Last change: 2026 Mar 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -510,6 +510,10 @@ Added by Vim (there are no standard codes for these):
510510
|xterm-focus-event|
511511
t_fd disable focus-event tracking *t_fd* *'t_fd'*
512512
|xterm-focus-event|
513+
t_BS begin synchronized update *t_BS* *'t_BS'*
514+
see 'termsync'
515+
t_ES end synchronized update *t_ES* *'t_ES'*
516+
see 'termsync'
513517

514518
Some codes have a start, middle and end part. The start and end are defined
515519
by the termcap option, the middle part is text.
@@ -528,6 +532,11 @@ t_SH must take one argument:
528532
t_RS is sent only if the response to t_RV has been received. It is not used
529533
on Mac OS when Terminal.app could be recognized from the termresponse.
530534

535+
The t_BS and t_ES are not stored in the termcap, but are instead set to the
536+
following default values on startup:
537+
t_BS "\033[?2026h"
538+
t_ES "\033[?2026l"
539+
531540
*mouse-reporting*
532541
Many terminals can report mouse clicks and some can report mouse movement and
533542
dragging. Vim needs to know what codes are being used for this.

runtime/doc/version9.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52613,6 +52613,9 @@ Options: ~
5261352613

5261452614
'statuslineopt' Extra options for the 'statusline', e.g. use the
5261552615
"maxheight" suboption to use several lines.
52616+
't_BS' Begin synchronized update.
52617+
't_ES' End synchronized update.
52618+
'termsync' Enable support for terminal DEC 2026 sync mode.
5261652619
'winhighlight' Window-local highlight group mappings.
5261752620

5261852621
==============================================================================

runtime/optwin.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" These commands create the option window.
22
"
33
" Maintainer: The Vim Project <https://github.com/vim/vim>
4-
" Last Change: 2026 Mar 02
4+
" Last Change: 2026 Mar 04
55
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
66

77
" If there already is an option window, jump to that one.
@@ -385,6 +385,8 @@ call <SID>AddOption("window", gettext("number of lines to scroll for CTRL-F and
385385
call append("$", " \tset window=" . &window)
386386
call <SID>AddOption("lazyredraw", gettext("don't redraw while executing macros"))
387387
call <SID>BinOptionG("lz", &lz)
388+
call <SID>AddOption("termsync", gettext("enable terminal sync mode"))
389+
call <SID>BinOptionG("tsy", &tsy)
388390
if has("reltime")
389391
call <SID>AddOption("redrawtime", gettext("timeout for 'hlsearch' and :match highlighting in msec"))
390392
call append("$", " \tset rdt=" . &rdt)

0 commit comments

Comments
 (0)