diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-09-18 18:33:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-18 18:33:00 -0400 |
| commit | e884c01befe74252249c4bed2f2922e474400ad6 (patch) | |
| tree | f53e2df530999b72c26cd33f0d60e856c418d342 /runtime/syntax/cpp.vim | |
| parent | 53074f2978092d22da341793b5f2a68247d8898e (diff) | |
| download | rneovim-e884c01befe74252249c4bed2f2922e474400ad6.tar.gz rneovim-e884c01befe74252249c4bed2f2922e474400ad6.tar.bz2 rneovim-e884c01befe74252249c4bed2f2922e474400ad6.zip | |
fix(multicursor): visual "gv", change-marks '[,'] #41988
Problem:
- `gv` reselects only primary's region, it doesn't have per-cursor
behavior. '< '> are buffer-global and the sandbox restores the
primary's marks. The Visual atom containing `gv` was voided anyway, so
it never cascaded.
- Same for change-marks (`'[ '] '.`): they are stale after edits from
other cursors, not managed per-cursor.
- `McSandbox` saves "editor state", which should be owned by the
`Context` module.
Solution:
Lift more state from `McSandbox` into `Context`. `kCtxCursor` (position,
curswant) and `kCtxMarks` (Visual area, change-marks), are owned by
`Context` now, as an "in-memory" special-case (TODO: support it for the
"serialized" case?).
- Classify a `gv` selection as replayable. Manage its state per-cursor.
Dot-repeat "." after `gv` behaves like Vim (the "1v" fallback).
- Save/restore change-marks per-cursor. The primary's change-marks are
shifted by edits from other cursors during the cascade.
`McSandbox` still contains (for now) the view and replay isolation
(typeahead/mode, redobuff, search patterns, the active selection).
Bonus:
- `visualmode()` is per cursor.
- A cursor's `curswant` follows its column when other cursors' edits
shift it, instead of the column captured after its own replay.
Diffstat (limited to 'runtime/syntax/cpp.vim')
0 files changed, 0 insertions, 0 deletions