From 714a6cd120e4ef2d15797a727c2c9f386bc201f4 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 24 Oct 2024 15:50:07 +0200 Subject: [PATCH] vim:aucmd: Specify what highlight to clear There shouldn't be highlights of the other kind (cword <-> visual) around. --- .config/vim/vimrc.d/80-autocommands.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc.d/80-autocommands.vim b/.config/vim/vimrc.d/80-autocommands.vim index c92eb9e..63852ee 100644 --- a/.config/vim/vimrc.d/80-autocommands.vim +++ b/.config/vim/vimrc.d/80-autocommands.vim @@ -74,7 +74,7 @@ function! HighlightCurrentWord() return endif - call ClearHighlights() + call ClearHighlights(s:CLEAR_HIGHS_CWORD) " Delay the highlight by 100ms so that not every word is highlighted " while moving the cursor fast. (This kind of simulates a CursorHold @@ -110,7 +110,7 @@ function! HighlightVisualSel() return endif - call ClearHighlights() + call ClearHighlights(s:CLEAR_HIGHS_VISUAL) let l:old_reg = getreg('"') let l:old_regtype = getregtype('"')