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 triggering an internal undo error.
Solution:
Update Insstart and Insstart_textlen after the pending undo save so the next edit starts from the command-updated cursor position.
AI-assisted: Codex
I gave Codex this bug in nvim L3MON4D3/LuaSnip#1248, and it found the minimal reproducer and the patch.
https://github.com/vim/vim/pull/20031
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()