diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-09-10 11:06:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 11:06:08 -0400 |
| commit | e973eb4a8ff5e3082de401b4667ee92ba4777847 (patch) | |
| tree | 5315447f27b4e63d6310465e5409fca4334b5d1d /runtime/lua/vim/fs.lua | |
| parent | 515c61f075d7b0a4d5e0a73c918e7898bf098268 (diff) | |
| download | rneovim-e973eb4a8ff5e3082de401b4667ee92ba4777847.tar.gz rneovim-e973eb4a8ff5e3082de401b4667ee92ba4777847.tar.bz2 rneovim-e973eb4a8ff5e3082de401b4667ee92ba4777847.zip | |
fix(multicursor): undo corrupted by insert that changes line-count #41835
Problem:
Undo "u" is wrong after cascading an insert that adds a line (`A{<CR>`, `o`, …).
The cascade replays the insert as a per-cursor `edit()`, where `u_save`
stores a line multiple times into the undo block at different line
counts; then `getbot` computes conflicting entries that undo each other.
Solution:
`u_save` the whole affected line-range as one entry at session start,
the same approach used by Vim for linewise ops (`op_shift`, `ex_sort`).
The "enclosing" `u_save` wins and the invalid entries are overridden.
Diffstat (limited to 'runtime/lua/vim/fs.lua')
0 files changed, 0 insertions, 0 deletions