vim:aucmd: Specify what highlight to clear

There shouldn't be highlights of the other kind (cword <-> visual)
around.
This commit is contained in:
2024-10-24 15:50:07 +02:00
parent b0688da69e
commit 714a6cd120

View File

@@ -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('"')