Skip to content

terminal: fix viewport pin during resize reflow#12300

Merged
mitchellh merged 1 commit intomainfrom
push-qlrpyuunqqtv
Apr 15, 2026
Merged

terminal: fix viewport pin during resize reflow#12300
mitchellh merged 1 commit intomainfrom
push-qlrpyuunqqtv

Conversation

@mitchellh
Copy link
Copy Markdown
Contributor

Maybe related to #12298?

When Screen resize forwards the active cursor into PageList reflow, a history-pinned viewport can be remapped into the active area before the preserved-cursor grow step finishes. The old code kept treating that viewport as a history pin during the intermediate grow calls, which left too few rows beneath the pin and tripped the viewport integrity checks.

Fix this by normalizing the viewport back to active as soon as reflow moves the pinned row into the active area. Add a Screen-level regression test that exercises the full resize path with bounded scrollback and wrapped rows, and document the setup so the unwrap and viewport transition are clear.

Maybe related to #12298?

When Screen resize forwards the active cursor into PageList reflow, a
history-pinned viewport can be remapped into the active area before the
preserved-cursor grow step finishes. The old code kept treating that
viewport as a history pin during the intermediate grow calls, which left
too few rows beneath the pin and tripped the viewport integrity checks.

Fix this by normalizing the viewport back to active as soon as reflow
moves the pinned row into the active area. Add a Screen-level regression
test that exercises the full resize path with bounded scrollback and
wrapped rows, and document the setup so the unwrap and viewport
transition are clear.
@mitchellh mitchellh added this to the 1.3.2 milestone Apr 15, 2026
@mitchellh mitchellh requested a review from a team as a code owner April 15, 2026 21:00
@ghostty-bot ghostty-bot bot added the vt Control sequence related label Apr 15, 2026
@mitchellh mitchellh merged commit 551bf0a into main Apr 15, 2026
33 checks passed
@mitchellh mitchellh deleted the push-qlrpyuunqqtv branch April 15, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vt Control sequence related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant