mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #542] [MERGED] fix(core): keep keyboard selection anchor stable across scroll #607
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#607
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/542
Author: @simonklee
Created: 1/16/2026
Status: ✅ Merged
Merged: 1/18/2026
Merged by: @kommander
Base:
main← Head:fix/textarea-scrollable-select-behaviour📝 Commits (10+)
ebe6133fix: select buffer home/end behaviour when textarea's content overflowsb138bc0rm unnecessary logicace3c0cfix(core): simplify keyboard selection without FFI048c280fix(core): clear selection state when range is empty665d658fix(textarea): improve scrollable select behaviour4f679bffix: scroll viewport to follow cursor during keyboard selection85d726dchore(core): cleanup codef3f6b97native optional follows cursor27e70dcdistinct keyboard selection085f6b3Merge branch 'main' into fix/textarea-scrollable-select-behaviour📊 Changes
6 files changed (+239 additions, -9 deletions)
View changed files
📝
packages/core/src/editor-view.ts(+4 -0)📝
packages/core/src/renderables/EditBufferRenderable.ts(+12 -2)📝
packages/core/src/renderables/__tests__/Textarea.selection.test.ts(+200 -1)📝
packages/core/src/zig.ts(+10 -2)📝
packages/core/src/zig/editor-view.zig(+8 -2)📝
packages/core/src/zig/lib.zig(+5 -2)📄 Description
Refactor EditBufferRenderable keyboard shift-selection to track a logical anchor and viewport delta, ensuring the cursor stays visible while selection updates correctly when the viewport scrolls (e.g. Shift+Home/End).
This is a continuation of https://github.com/anomalyco/opentui/pull/522 without FFI plumbing for fixing #521
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.