mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[GH-ISSUE #684] Textarea delete actions handle newlines incorrectly (Option+Backspace and Cmd+Backspace) #182
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#182
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?
Originally created by @slimewell on GitHub (Feb 13, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/684
Context
This issue was found while fixing OpenCode input behavior (
anomalyco/opencode#8645).The fix should be in OpenTUI action handling so all textareas behave consistently.
Current behavior
Option+Backspace(delete-word-backward) can remove a newline when deleting the first word of a line (when there is a line above it).Cmd+Backspace(delete-to-line-start) deletes to the start of the current line, but does not remove the newline when the cursor is already at the start of a line.Expected behavior
Option+Backspace: delete the previous word only and keep the newline.Cmd+Backspace:Reproduction
Input:
first line of words
second line doo
third foo bar
thirdon the third line.Option+Backspace.Then test
Cmd+Backspace:Moved here as this is action-level behavior (
delete-word-backward/delete-to-line-start) and should be fixed in OpenTUI rather than app-levelonKeyDownworkarounds.Related