mirror of
https://github.com/openai/codex.git
synced 2026-11-28 07:32:19 +00:00
tui: ^C in prompt area resets history navigation cursor (#5078)
^C resets the history navigation, similar to zsh/bash. Fixes #4834 ------ https://chatgpt.com/codex/tasks/task_i_68e9674b6ac8832c8212bff6cba75e87
This commit is contained in:
1 parent
f38ad65254
commit
0016346dfb
3 files changed
+37
-1
No files matched your search
@@ -316,6 +316,11 @@ impl ChatComposer {
|
||||
self.sync_file_search_popup();
|
||||
}
|
||||
|
||||
pub(crate) fn clear_for_ctrl_c(&mut self) {
|
||||
self.set_text_content(String::new());
|
||||
self.history.reset_navigation();
|
||||
}
|
||||
|
||||
/// Get the current composer text.
|
||||
pub(crate) fn current_text(&self) -> String {
|
||||
self.textarea.text().to_string()
|
||||
|
||||
Reference in new issue
Block a user