Skip to content

fix: keep terminal viewport at bottom on enter - #57

Merged
qfxiongbinbin merged 1 commit into
mainfrom
fix/terminal-scroll-jump-on-enter
Apr 15, 2026
Merged

qfxiongbinbin merged 1 commit into
mainfrom
fix/terminal-scroll-jump-on-enter

Conversation

@qfxiongbinbin

Copy link
Copy Markdown
Owner

Problem

Pressing Enter in the terminal can jump the viewport to the top instead of keeping the prompt anchored near the bottom.

What changed

  • Added a small helper to detect whether the terminal viewport is already near the bottom
  • When replaying buffered output, resizing the terminal, or writing a new chunk, keep the viewport pinned to the bottom only if the user was already near the bottom
  • Avoid forcing scroll when the user has intentionally scrolled up into history

Expected result

  • Pressing Enter in a normal terminal session no longer jumps the viewport to the top
  • Users can still scroll up and inspect history without the app fighting them

@qfxiongbinbin
qfxiongbinbin merged commit 8864188 into main Apr 15, 2026
@qfxiongbinbin
qfxiongbinbin deleted the fix/terminal-scroll-jump-on-enter branch April 15, 2026 10:11
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