Repository navigation
Conversation
ctrl+w (or alt+backspace) right after a "[Pasted ~5 lines]" placeholder deleted only the last word of its label, leaving "[Pasted ~5 " behind with the pasted text detached from it; ctrl+u and ctrl+k did the same when the line edge cut into a placeholder. Backspace and delete already removed it whole. The cause is in @opentui/core: its extmark controller's deleteRange, which every word and line delete goes through, trimmed a virtual extmark instead of treating it as one unit. The fix is upstream as anomalyco/opentui#1628; patches/@OpenTui%2Fcore@0.4.5.patch backports it to the pinned 0.4.5 until a release with it is adopted. deleteRange now widens its range over every virtual extmark it cuts into.
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This was referenced Oct 11, 2026
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
Session record and five feature records for item 28: atomic placeholder deletes (opentui#1628 backport), configurable paste summary, raw paste on <leader>v, grouped prompt undo with fork ctrl+z defaults, and the click-to-edit paste dialog, with their upstream v1 PRs anomalyco#54457-anomalyco#54460 and anomalyco#54463, key-byte measurements through Vibeterm's tmux, and the vt-206 installs on desktop and m4max. AI-Tool: opencode 1.18.34-vt-194-907b3bc518 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm 9343cff AI-Session-ID: ses_ed7634c31ffeH84yR0S99Ty8Nd
Nowaker
added a commit
to Nowaker/opencode
that referenced
this pull request
Oct 11, 2026
Session record and five feature records for item 28: atomic placeholder deletes (opentui#1628 backport), configurable paste summary, raw paste on <leader>v, grouped prompt undo with fork ctrl+z defaults, and the click-to-edit paste dialog, with their upstream v1 PRs anomalyco#54457-anomalyco#54460 and anomalyco#54463, key-byte measurements through Vibeterm's tmux, and the vt-206 installs on desktop and m4max. AI-Tool: opencode 1.18.34-vt-194-907b3bc518 AI-Model: anthropic/claude-opus-5-5 AI-Variant: high AI-Platform: linux AI-Harness: Vibeterm 9343cff AI-Session-ID: ses_ed7634c31ffeH84yR0S99Ty8Nd
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: I'm aware v1 is now the maintenance branch and new features go to v2 only. This PR is here for others to use, and I'll submit the v2 version once I've migrated my whole plugin system to it.
Issue for this PR
None found; this is a bug in the prompt's placeholder handling.
Type of change
What does this PR do?
ctrl+w (or alt+backspace) right after a
[Pasted ~5 lines]placeholder deletes only the last word of its label and leaves[Pasted ~5in the prompt, detached from the pasted text. ctrl+u and ctrl+k do the same when the line edge cuts into a placeholder. Backspace and delete already remove it whole.The cause is in
@opentui/core: its extmark controller'sdeleteRange, which every word and line delete goes through, trims a virtual extmark instead of treating it as one unit. The fix is upstream as anomalyco/opentui#1628:deleteRangewidens its range over every virtual extmark it cuts into. This PR backports it to the pinned0.4.5withpatches/@opentui%2Fcore@0.4.5.patchuntil a release with the fix is adopted.How did you verify your code works?
test/component/prompt-placeholder-delete.test.tsx: delete word backward and forward, delete to line end, and a range ending inside a placeholder each remove it whole. Three of the four fail without the patch.bun typecheckandbun testinpackages/tui.see [Pasted ~3 lines]down tosee(or the empty prompt) in one press.Checklist
This PR is AI generated, but under direct supervision and on request of @Nowaker.