fix(multicursor): atom may cascade in another buffer #41624

Problem:
An atom queued in buffer A cascades on B's cursors if the mapping ends
in B ("nnoremap X x:bnext<CR>").

Solution:
Check the atom's origin buffer (`CmdAtom.origin.buf`).

Note: This does not preclude mappings etc from doing work in temporary
throwaway buffers, as long as they return to the origin buffer.
This commit is contained in:
Justin M. Keyes authored and GitHub committed 2026-09-02 10:38:27 -04:00
1 parent 8321941ff2
commit 80e9708afa
4 files changed
+40 -6

No files matched your search

+1
View File
@@ -343,6 +343,7 @@ context), multicursor replays actions "semantically" (|CmdAtom|).
line at cursor, not the entire folded contents). Motions step into folds
instead of skipping over them. The primary cursor keeps the usual
|fold-behavior|.
- Cursors are per-buffer, and cascade only while their buffer is current.
- CTRL-C interrupts the cascade.
Example: place a cursor on every matching pattern: >