Skip to content

/editor: non-successful editor exits should keep the text in the textarea#693

Closed
Schniz wants to merge 2 commits intoanomalyco:devfrom
Schniz:schniz/non-successful-editor-exit
Closed

/editor: non-successful editor exits should keep the text in the textarea#693
Schniz wants to merge 2 commits intoanomalyco:devfrom
Schniz:schniz/non-successful-editor-exit

Conversation

@Schniz
Copy link
Contributor

@Schniz Schniz commented Jul 4, 2025

when doing :cq i assume that the textarea cobtent will not have my changes in vim, but also dont clear up the content (which is what it currently does).

This PR ensures that :cq will avoid overwriting the textarea with emoty xontent

@Schniz Schniz force-pushed the schniz/non-successful-editor-exit branch from 20bd568 to 3c82c24 Compare July 4, 2025 20:42
@adamdotdevin
Copy link
Contributor

we just added attachments, and we need to avoid SetValue because it clears attachments; i was going to remove that function altogether just hadn't gotten to it yet!

@Schniz
Copy link
Contributor Author

Schniz commented Jul 4, 2025

Ack so I’ll figure out a different way. Probably just not removing in the first place.

Schniz and others added 2 commits July 5, 2025 23:22
…area

# Conflicts:
#	packages/tui/internal/tui/tui.go
Only clear textarea when external editor exits successfully, rather than clearing immediately and restoring on failure. This simpler approach prevents content loss when the editor exits with non-zero status.

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
@Schniz Schniz force-pushed the schniz/non-successful-editor-exit branch from 83f6876 to cd84116 Compare July 5, 2025 20:22
@Schniz
Copy link
Contributor Author

Schniz commented Jul 6, 2025

@adamdotdevin i asked opencode to rebase and make sure to support them attachments. It works, but the main issue I can see is that attachments in /editor are not well supported and get cleared. But that's unrelated to this PR--it is how it works right now in dev.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants