Skip to content

Add Vim undo to the TUI composer - #41941

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12ecdb3c34a2d66f5d856aa2f82dc15bd91b230b
Sep 1, 2026
Merged

Add Vim undo to the TUI composer#41941
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12ecdb3c34a2d66f5d856aa2f82dc15bd91b230b

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 1, 2026

Copy link
Copy Markdown

Add Vim undo to the TUI composer

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.

## 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
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/12ecdb3c34a2d66f5d856aa2f82dc15bd91b230b branch from ec66621 to 9c7edd4 Compare September 1, 2026 00:22
@copyberry
copyberry Bot merged commit 9c7edd4 into main Sep 1, 2026
23 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/12ecdb3c34a2d66f5d856aa2f82dc15bd91b230b branch September 1, 2026 00:23
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants