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:
Benjamin Carlsson authored and copyberry committed 2026-09-01 21:30:27 +00:00
1 parent 612e6491d5
commit b192442fc7
18 files changed
+318 -59

No files matched your search

+10
View File
@@ -3944,6 +3944,7 @@
"open_line_above": null,
"open_line_below": null,
"paste_after": null,
"redo": null,
"repeat_last_change": null,
"replace_char": null,
"start_change_operator": null,
@@ -4771,6 +4772,7 @@
"open_line_above": null,
"open_line_below": null,
"paste_after": null,
"redo": null,
"repeat_last_change": null,
"replace_char": null,
"start_change_operator": null,
@@ -5234,6 +5236,14 @@
],
"description": "Paste after cursor (`p`)."
},
"redo": {
"allOf": [
{
"$ref": "#/definitions/KeybindingsSpec"
}
],
"description": "Redo the last undone edit (`ctrl-r`)."
},
"repeat_last_change": {
"allOf": [
{