From 12e14673bdb641a00ee3829bf9e6e45f550b365e Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 24 Oct 2024 15:51:31 +0200 Subject: [PATCH] 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: --- .config/vim/vimrc.d/80-autocommands.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/vim/vimrc.d/80-autocommands.vim b/.config/vim/vimrc.d/80-autocommands.vim index 63852ee..ab7310f 100644 --- a/.config/vim/vimrc.d/80-autocommands.vim +++ b/.config/vim/vimrc.d/80-autocommands.vim @@ -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 |