Skip to content

fix: correct selection overflow during auto-scroll#86

Merged
sreya merged 1 commit into
mainfrom
fix-text-selection-scroll-overflow
Dec 4, 2025
Merged

fix: correct selection overflow during auto-scroll#86
sreya merged 1 commit into
mainfrom
fix-text-selection-scroll-overflow

Conversation

@sreya

@sreya sreya commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

fixes an issue where highlighting and scrolling back would cause way more output to get highlighted than intended

The auto-scroll selection handler was using viewportY directly as the
absolute row position, but the coordinate systems are different:
- viewportY = how far scrolled into history (0 = at bottom)
- absoluteRow = index into combined buffer (0 = oldest scrollback)

This caused selections to jump to very old scrollback lines when
auto-scrolling upward. Fixed by using viewportRowToAbsolute() helper
which correctly converts viewport coordinates to absolute buffer rows.
@sreya sreya merged commit e27776c into main Dec 4, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant