mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add redo support to Vim composer history (#42140)
## What changed - Add a bounded redo stack for complete composer drafts, including paste payloads and image attachments. `Ctrl+R` now reapplies the last undone edit in Vim normal mode, while new edits clear stale redo history. - Add the configurable `vim_normal.redo` action to the keymap schema and picker. Preserve reverse prompt-history search in Vim insert mode and non-Vim mode, and honor explicitly configured bindings. - Keep pending edit snapshots outside the shared undo/redo byte budget so canceled commands cannot evict committed history. ## Testing - Cover grouped edits, Vim searches, direct draft changes, history limits, empty redo stacks, and custom or unbound shortcuts. GitOrigin-RevId: 0cf5bb376ff865ddc0a77705dcb322ef6b57b3a3
This commit is contained in:
1 parent
612e6491d5
commit
b192442fc7
18 files changed
+318
-59
No files matched your search
@@ -271,6 +271,8 @@ pub struct TuiVimNormalKeymap {
|
||||
pub start_change_operator: Option<KeybindingsSpec>,
|
||||
/// Undo the last complete edit (`u`).
|
||||
pub undo: Option<KeybindingsSpec>,
|
||||
/// Redo the last undone edit (`ctrl-r`).
|
||||
pub redo: Option<KeybindingsSpec>,
|
||||
/// Cancel a pending operator and return to normal mode.
|
||||
pub cancel_operator: Option<KeybindingsSpec>,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user