Files
neovim/test/functional/legacy/prompt_buffer_spec.lua
Sean Dewar a5eb023a53 fix(prompt): clear undo when changing/appending prompt
Problem: undoing after the prompt is changed breaks it (and causes init_prompt
to abort it and append a new one), as the undo history contains the old prompt.

Solution: like submitting, clear the undo buffer. Don't do it in init_prompt if
the line was empty; that may not result in a new prompt, and causes commands
like "S" to lose the history.

As u_save, etc. wasn't being called by prompt_setprompt, undoing after it fixes
the prompt usually gave undesirable results anyway.

Remove the added undo_spec.lua test, as its approach no longer works as a repro,
and finding a new one seems fiddly.
2026-02-17 23:43:37 +00:00

30 KiB