mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #522] [CLOSED] fix: select buffer home/end behaviour when textarea's content overflows #593
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#593
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/522
Author: @danolekh
Created: 1/14/2026
Status: ❌ Closed
Base:
main← Head:fix/textarea-scrollable-select-behaviour📝 Commits (2)
553ce28fix: select buffer home/end behaviour when textarea's content overflows07b7000rm unnecessary logic📊 Changes
7 files changed (+219 additions, -5 deletions)
View changed files
📝
packages/core/src/editor-view.ts(+10 -0)📝
packages/core/src/lib/selection.ts(+9 -0)📝
packages/core/src/renderables/EditBufferRenderable.ts(+32 -5)📝
packages/core/src/renderables/__tests__/Textarea.selection.test.ts(+100 -0)📝
packages/core/src/zig.ts(+20 -0)📝
packages/core/src/zig/editor-view.zig(+33 -0)📝
packages/core/src/zig/lib.zig(+15 -0)📄 Description
fixes #521 and makes possible to properly implement #518
overview from clod:
Problem: Shift+cmd+arrow keys (select to buffer home/end) didn't work correctly in scrollable Textareas because selection anchor coordinates were captured relative to the wrong viewport position.
Root Cause: updateSelectionForMovement stored selection anchor using viewport-relative visual coordinates. When the viewport scrolled during a large cursor jump, the anchor became invalid.
Solution:
fix tested in alacritty & kitty terminals
preview
https://github.com/user-attachments/assets/7a61e7f2-6a87-4cbf-843f-b760d9619f76
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.