Start fresh Vim drafts in Insert mode (#41921)

## What changed

- Start the composer in Vim Insert mode when Vim is enabled and return to
  Insert mode after submissions and slash-command dispatch.
- Record the fresh Insert session as a Vim edit so `.` can repeat text entered
  in a new draft.
- Keep `/` and `?` as Normal-mode composer searches, and let Backspace cancel
  an empty search query and any pending operator without changing the draft.

## Testing

- Add coverage for startup, submitted and queued drafts, inline and goal slash
  commands, repeatable edits, and canceled searches.

GitOrigin-RevId: 1a5ee30c44685d2b2a037e46c3ab4ab611024919
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-08-31 22:26:09 +00:00
1 parent 865bbf9a69
commit 0344625ccf
12 files changed
+137 -39

No files matched your search

@@ -664,6 +664,9 @@ impl ChatWidget {
.set_composer_text(String::new(), Vec::new(), Vec::new());
self.bottom_pane.set_composer_pending_pastes(Vec::new());
self.bottom_pane.drain_pending_submission_state();
if self.bottom_pane.composer_is_vim_enabled() {
self.bottom_pane.enable_vim_in_insert_mode();
}
}
fn prepared_inline_user_message(