Skip to content

Prevent viewport scrolling on auto-wrap at the bottom row of alternate buffer - #336

Open
Fredy Wijaya (fredyw) wants to merge 2 commits into
JetBrains:masterfrom
fredyw:issue_335
Open

Prevent viewport scrolling on auto-wrap at the bottom row of alternate buffer#336
Fredy Wijaya (fredyw) wants to merge 2 commits into
JetBrains:masterfrom
fredyw:issue_335

Conversation

@fredyw

Copy link
Copy Markdown
Contributor

When text auto-wraps at the bottom row of the alternate screen buffer, it previously triggered a scroll event that shifted the entire viewport up, which can cause full-screen TUI layouts, e.g. nvim/tmux to become misaligned.

Since full-screen alternate buffer applications explicitly manage their layout and cursor positions and do not rely on terminal-managed auto-wrap scrolling, we disable scrolling on auto-wrap when the cursor is at the bottom row of the alternate buffer.

Before:
tmux_nvim_status_off

After:
tmux_nvim_status_off_fix

Fixes #335

…e buffer

When text auto-wraps at the bottom row of the alternate screen buffer, it
previously triggered a scroll event that shifted the entire viewport up,
which can cause full-screen TUI layouts, e.g. nvim/tmux to become misaligned.

Since full-screen alternate buffer applications explicitly manage their layout
and cursor positions and do not rely on terminal-managed auto-wrap scrolling,
we disable scrolling on auto-wrap when the cursor is at the bottom row of
the alternate buffer.

Fixes JetBrains#335
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.

Viewport shifts and truncates top line in full-screen TUIs on window resize

1 participant