-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix esc #2661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix esc #2661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
popup.move_down(); | ||
(InputResult::None, true) | ||
} | ||
KeyEvent { | ||
code: KeyCode::Esc, .. | ||
} => { | ||
// Dismiss the slash popup; keep the current input untouched. | ||
self.active_popup = ActivePopup::None; | ||
(InputResult::None, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Esc dismissal of slash popup reopened immediately
In handle_key_event_with_slash_popup
the Esc branch clears active_popup
(lines 321‑327) to hide the slash command menu. But handle_key_event
then unconditionally calls sync_command_popup
(lines 280‑290), which recreates the popup whenever the text still starts with '/'. Thus Esc cannot actually close the popup, contradicting the intended behaviour.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to esc hide pop up on the slash or not?
@edward-bayes @easong-openai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes - sometimes you just want a /
Esc should have other functionalities when it's not used in a backtracking situation. i.e. to cancel pop up menu when selecting model/approvals or to interrupt an active turn.