Files
neovim/test/old
zeertzjq 2445fab6fb vim-patch:9.2.0384: stale Insstart after cursor move breaks undo (#39290)
vim-patch:9.2.0384: stale Insstart after <Cmd> cursor move breaks undo

Problem:  A <Cmd> command executed from Insert mode can sync undo and
          move the cursor before the next edit. stop_arrow() saved the
          new cursor line for undo, but left Insstart at the previous
          insertion point. A line-start backspace could then delete
          lines above the saved line without saving the joined range,
          leaving a pending undo entry whose bottom resolved above
          its top and raising E340.
Solution: Update Insstart and Insstart_textlen after the pending undo
          save so the next edit starts from the command-updated cursor
          position (Jaehwang Jung).

closes: vim/vim#20031

AI-assisted: Codex

d4fb31762e

Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
2026-04-22 01:35:47 +00:00
..
2023-11-12 21:26:39 +01:00