vim:aucmd:HighVisualSel: Abort on empty selection
When starting visual mode on an empty line (i.e. empty selection) everything would get highlighted.
This commit is contained in:
@@ -94,6 +94,11 @@ function! HighlightVisualSel()
|
||||
let l:old_regtype = getregtype('"')
|
||||
silent! norm ygv
|
||||
|
||||
if @" == ""
|
||||
" Abort when visual mode stated on an empty line
|
||||
return
|
||||
endif
|
||||
|
||||
let w:visual_match_ids = []
|
||||
|
||||
" Add match to all windows containing the current buffer
|
||||
|
||||
Reference in New Issue
Block a user