fix(tui): prevent dead keystrokes when spawning editor#4634
Closed
terakael wants to merge 1 commit into
Closed
Conversation
github-actions
Bot
force-pushed
the
dev
branch
from
November 22, 2025 18:07
f1dc981 to
3e15a39
Compare
github-actions
Bot
force-pushed
the
dev
branch
3 times, most recently
from
November 27, 2025 01:29
f8ee907 to
6a9856d
Compare
Properly save and restore terminal state when launching external editor: - Remove stdin listeners before editor spawn to prevent OpenTUI from consuming keystrokes - Save terminal settings with stty and restore after editor exits - Clear screen and reset cursor to avoid rendering artifacts - Track raw mode state explicitly for correct renderer state management
terakael
force-pushed
the
fix-tui-dead-keystrokes-clean
branch
from
December 8, 2025 10:30
e74eecf to
0d824bd
Compare
terakael
pushed a commit
to terakael/opencode
that referenced
this pull request
Dec 11, 2025
- Add Editor.Result discriminated union type - Move error checking into Editor.open() function - Update session export and prompt handlers to use Result object - Remove duplicate precondition checks from call sites - Simplify error handling across both editor use cases Builds on: fix-tui-dead-keystrokes-clean (PR anomalyco#4634)
Contributor
Author
|
The dead keystrokes have been fixed in a different commit; this is no longer necessary |
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.
Summary
Fixes the issue where keystrokes become unresponsive after spawning an external editor from the TUI.
Changes
sttyto maintain proper terminal stateTesting