mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add Vim undo to the TUI composer (#41941)
## Why Composer drafts include attachments, mention targets, and deferred paste payloads in addition to visible text. Vim undo needs to restore that complete state as a single edit. ## What changed - Add bounded, draft-level Vim undo history, with `u` as the configurable default binding in normal mode. - Group complete Vim commands and insert sessions into undo steps, including direct composer changes such as pastes and attachments. - Preserve undo, repeat, and search state when a reverse-history preview is canceled, and start fresh history when another prompt is accepted. ## Testing - Cover grouped edits, custom bindings, history and search interactions, attachments, and large paste payloads. GitOrigin-RevId: 12ecdb3c34a2d66f5d856aa2f82dc15bd91b230b
This commit is contained in:
1 parent
c5a3700dd7
commit
9c7edd4bc3
22 files changed
+773
-26
No files matched your search
@@ -269,6 +269,8 @@ pub struct TuiVimNormalKeymap {
|
||||
pub start_yank_operator: Option<KeybindingsSpec>,
|
||||
/// Begin change operator; next keys select a text object.
|
||||
pub start_change_operator: Option<KeybindingsSpec>,
|
||||
/// Undo the last complete edit (`u`).
|
||||
pub undo: Option<KeybindingsSpec>,
|
||||
/// Cancel a pending operator and return to normal mode.
|
||||
pub cancel_operator: Option<KeybindingsSpec>,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user