prompt-input: Preserve draft when accidentally navigating history#44
Closed
arewm wants to merge 1 commit into
Closed
prompt-input: Preserve draft when accidentally navigating history#44arewm wants to merge 1 commit into
arewm wants to merge 1 commit into
Conversation
Typing while viewing a history entry permanently destroyed the user's in-progress draft. Now the draft survives and can be recovered by pressing down-arrow. Note: if the user presses up-arrow again (re-entering history) after editing, the current editor content becomes the new saved draft, replacing the original. Recovery via down-arrow must happen before pressing up again. Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: arewm <arewm@users.noreply.github.com>
Owner
|
So...this is in the forked opencode UI code, so if this is a bug that exists there. But the current UI already works for me for this - if I type some text in the prompt, press up, then press down I get back to my original text. |
Collaborator
Author
|
I am going to close this for now. I occasionally tried to go up too far and then started typing before I realized that I went up too far. This was to try to mitigate that, but let me try to be more intentional about my activity. I think the behavior that I am changing away from is the default for many of these environments, so I am introducing an abnormality. |
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.
Typing while viewing a history entry permanently destroyed the user's in-progress draft. Now the draft survives and can be recovered by pressing down-arrow.
Note: if the user presses up-arrow again (re-entering history) after editing, the current editor content becomes the new saved draft, replacing the original. Recovery via down-arrow must happen before pressing up again.
Assisted-by: OpenCode (Claude claude-opus-4-6)