vim:au: Fix empty line selection in linewise-visual

`highlight_selection()` is supposed to abort if the visual mode was
started on an empty line. This was done correctly for charwise-visual
but failed to do so in linewise-visual.
This commit is contained in:
2024-11-04 16:54:51 +01:00
parent fc1e1bdd1e
commit 551fde8f2b

View File

@@ -123,8 +123,8 @@ function! s:_highlight_selection(timer)
silent normal y
normal gv
if @" == ""
" Abort when visual mode stated on an empty line
if @" == "" || @" == "\n"
" Abort when visual mode started on an empty line
return
endif