aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/range.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-08-15 13:34:51 -0400
committerGitHub <noreply@github.com>2026-08-15 13:34:51 -0400
commit37c670e68297264a5606ffd0e25d7fb4c585a379 (patch)
tree3bbbb29143706985182100ef3d4f0d06fec688d7 /runtime/lua/vim/range.lua
parentfb180287d0d3068b5873f4a7a39f506b4d52086d (diff)
downloadrneovim-37c670e68297264a5606ffd0e25d7fb4c585a379.tar.gz
rneovim-37c670e68297264a5606ffd0e25d7fb4c585a379.tar.bz2
rneovim-37c670e68297264a5606ffd0e25d7fb4c585a379.zip
fix(marks): undo reverts a mark set after the change #41330
Problem: A named mark updated after a change is moved back (treated as the original mark) by undo: :1mark d :$ dw :2mark d " 'd is on line 2 :undo " 'd is back on line 1 The undo header snapshots `b_namedm` when the change is recorded, and `u_undoredo()` restores that snapshot indiscriminately. Solution: Update the pending header's snapshot when a mark is set explicitly. Marks that the change itself moved go through mark_adjust(), not setmark_pos(), so those are still reverted. Similar to 2546741d1b36 (for extmarks): an explicit set inside an undo block is confused with an edit-driven adjustment. But the extmarks case is dealing with mid-edit moves, whereas named/regular marks only need the stale snapshot dropped.
Diffstat (limited to 'runtime/lua/vim/range.lua')
0 files changed, 0 insertions, 0 deletions