mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Start fresh Vim drafts in Insert mode (#41921)
## What changed - Start the composer in Vim Insert mode when Vim is enabled and return to Insert mode after submissions and slash-command dispatch. - Record the fresh Insert session as a Vim edit so `.` can repeat text entered in a new draft. - Keep `/` and `?` as Normal-mode composer searches, and let Backspace cancel an empty search query and any pending operator without changing the draft. ## Testing - Add coverage for startup, submitted and queued drafts, inline and goal slash commands, repeatable edits, and canceled searches. GitOrigin-RevId: 1a5ee30c44685d2b2a037e46c3ab4ab611024919
This commit is contained in:
1 parent
865bbf9a69
commit
0344625ccf
12 files changed
+137
-39
No files matched your search
@@ -265,9 +265,11 @@ impl ChatWidget {
|
||||
if let Some(keymap) = runtime_keymap {
|
||||
widget.bottom_pane.set_keymap_bindings(&keymap);
|
||||
}
|
||||
widget
|
||||
.bottom_pane
|
||||
.set_vim_enabled(widget.config.tui_vim_mode_default);
|
||||
if widget.config.tui_vim_mode_default {
|
||||
widget.bottom_pane.enable_vim_in_insert_mode();
|
||||
} else {
|
||||
widget.bottom_pane.set_vim_enabled(/*enabled*/ false);
|
||||
}
|
||||
widget
|
||||
.bottom_pane
|
||||
.set_status_line_enabled(!widget.configured_status_line_items().is_empty());
|
||||
|
||||
Reference in new issue
Block a user