Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Synchronized-output edge cases can expose partial frames during viewport changes, freeze redraws indefinitely, and leave buffered output undisplayed after disconnect.
3 open issues
What changed in this PR
Adds DEC mode 2026 synchronized output to the terminal, aiming to reduce flicker by deferring canvas polling while programs redraw their screens.
Changes:
- Handles synchronized-output start, end, and reset sequences.
- Adds a 200-ms polling grace period and preserves the mode when moving terminal tabs.
- Extends the mock control and emulator tests to cover mode toggling and resets.
| File | Description |
|---|---|
| terminal/tests/org.eclipse.terminal.test/src/org/eclipse/terminal/internal/emulator/VT100EmulatorTest.java | Tests mode toggling and reset behavior. |
| terminal/tests/org.eclipse.terminal.test/src/org/eclipse/terminal/internal/emulator/MockTerminalControlForText.java | Tracks synchronized-output state for tests. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/textcanvas/PollingTextCanvasModel.java | Defers polling during the redraw grace period. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/emulator/VT100TerminalControl.java | Stores and transfers synchronization state to canvas models. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/emulator/VT100Emulator.java | Handles DEC mode 2026 and clears it on reset. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/control/impl/ITerminalControlForText.java | Adds the synchronized-output control hook. |
Review effort: Balanced
insjang
force-pushed
the
synchronized-output
branch
2 times, most recently
from
November 12, 2026 10:16
a0a1cba to
6f0008f
Compare
insjang
force-pushed
the
synchronized-output
branch
2 times, most recently
from
November 13, 2026 04:12
2ded62d to
db09d12
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Synchronized output can display cached rows at incorrect positions when scrolling, and its wall-clock-based safety timeout can leave the display frozen after a backward clock adjustment.
2 open issues
2 resolved since last review
Review effort: Balanced
insjang
force-pushed
the
synchronized-output
branch
from
November 13, 2026 07:16
db09d12 to
02ad410
Compare
A program that redraws its screen in many writes can bracket each screen with CSI ? 2026 h and CSI ? 2026 l. The view polls the text every 50 ms and used to paint whatever it found, often a screen half drawn, which shows as flicker and as a cursor jumping over the screen. While a program is between the two, the canvas model does not look at the text, and the next poll after the end paints the finished screen. The check and the copy of the text are one locked step, so a screen cannot begin between them, and a scroll or a resize waits like a poll: the view moves with the next copy, not over the lines held back. A program that never ends a screen, or begins the next one right after, does not freeze the view: it is held back at most 200 ms since it last looked, on a clock that does not move with the time of day. A full reset or a disconnect ends the mode, and the last poll then shows what the program had drawn. As with DECTCEM, the flag is kept on the control and copied to the new canvas model under the same lock when the tab is moved to another view. Split out of eclipse-platform#2902 as asked in its review.
insjang
force-pushed
the
synchronized-output
branch
from
November 13, 2026 08:20
02ad410 to
d359f3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A program that redraws its screen in many writes can bracket each screen with CSI ? 2026 h and CSI ? 2026 l (Claude Code, Codex and other TUIs do). The view polls the text every 50 ms and used to paint whatever it found, often a screen half drawn, which shows as flicker and as a cursor jumping over the screen.
While a program is between the two, the canvas model skips its polls, and the next poll after the end paints the finished screen. A program that begins a screen and never ends it does not freeze the view: the skip lasts at most 200 ms, and a full reset or the end of the connection ends it. As with DECTCEM, the flag is kept on the control and copied to the new canvas model under the same lock when the tab is moved to another view.
Split out of #2902 as asked in its review.
How to test, in a bash terminal:
"first second" appears at once; without the change "first" shows alone for a moment.
"still shown" appears after about 200 ms although the end never comes; the view does not freeze.
Tests: 2 new cases in VT100EmulatorTest (mode on and off, full reset ends it).