vim:aucmd:TODO: CursorMoved != SelectionChanged

There are operations that change the visual selection without moving the
cursor (e.g. `viw` when on the last character). These do not trigger
CursorMoved so the highlighting also does not change.

TODO: <COMMIT>
This commit is contained in:
2024-10-24 15:51:31 +02:00
parent 714a6cd120
commit 12e14673bd

View File

@@ -163,6 +163,8 @@ endfunction
augroup highlight_current
au!
" TODO: `viw` when on the last character of the word does not trigger
" CursorMoved, but the selection changes
au CursorMoved * if mode() == 'n' |
\ call HighlightCurrentWord() |
\ else |