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:
@@ -123,8 +123,8 @@ function! s:_highlight_selection(timer)
|
|||||||
silent normal y
|
silent normal y
|
||||||
normal gv
|
normal gv
|
||||||
|
|
||||||
if @" == ""
|
if @" == "" || @" == "\n"
|
||||||
" Abort when visual mode stated on an empty line
|
" Abort when visual mode started on an empty line
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user