mirror of
https://github.com/openai/codex.git
synced 2026-11-28 07:32:19 +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
@@ -63,6 +63,7 @@ use self::vim_commands::VimAction;
|
||||
use self::vim_commands::VimCommandState;
|
||||
use self::vim_commands::VimEditTarget;
|
||||
use self::vim_commands::VimInsertPosition;
|
||||
pub(crate) use self::vim_commands::VimPersistentState;
|
||||
|
||||
const WORD_SEPARATORS: &str = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";
|
||||
|
||||
|
||||
Reference in new issue
Block a user