Skip to content

Move displaced line of top-anchored scroll region into scroll-back#2764

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:feature/terminal-scrollregion-history-2680
Open

Move displaced line of top-anchored scroll region into scroll-back#2764
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:feature/terminal-scrollregion-history-2680

Conversation

@vogella

@vogella vogella commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Full-screen CLIs such as Codex in --no-alt-screen mode render through DECSTBM scroll regions anchored at the top of the screen and scroll by emitting newlines at the region bottom. The emulator scrolled such a region in place and discarded the displaced top line, so no scroll-back history was created and the output could not be scrolled backwards.

Like xterm and VTE, a newline at the bottom of a scroll region whose top margin is the top of the screen now moves the displaced top line into the scroll-back history, while the lines below the region keep their position on the screen. Regions with a lower top margin still scroll in place, guarded by the characterization tests from #2701; the test documenting the old top-anchored behavior is flipped to assert the history is created.

This addresses the missing backward scrolling reported in #2680.

Full-screen CLIs such as Codex in --no-alt-screen mode render through
DECSTBM scroll regions anchored at the top of the screen and scroll by
emitting newlines at the region bottom. VT100EmulatorBackend scrolled
such a region in place and discarded the displaced top line, so no
scroll-back history was created and the output could not be scrolled
backwards.

Like xterm and VTE, a newline at the bottom of a scroll region whose
top margin is the top of the screen now moves the displaced top line
into the scroll-back history, while the lines below the region keep
their position on the screen. Scroll regions with a top margin below
the top of the screen still scroll in place and discard the top line.

The characterization test documenting the old behavior is flipped to
assert that the history is created; the remaining scrolling guards are
unchanged.

eclipse-platform#2680
@vogella vogella force-pushed the feature/terminal-scrollregion-history-2680 branch from 56fa99a to e33fdba Compare June 11, 2026 17:40
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   58m 56s ⏱️ + 3m 9s
 4 677 tests ±0   4 653 ✅  - 2   22 💤 ±0  2 ❌ +2 
11 925 runs  ±0  11 770 ✅  - 2  153 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit e33fdba. ± Comparison against base commit a0e395d.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
org.eclipse.terminal.internal.emulator.VT100EmulatorBackendTest ‑ testNewlineInTopAnchoredScrollRegionCurrentlyDiscardsTopLine
org.eclipse.terminal.internal.emulator.VT100EmulatorBackendTest ‑ testNewlineInTopAnchoredScrollRegionMovesTopLineToHistory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant