aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/utils.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim
index c0eab5f..9d84c9b 100644
--- a/autoload/utils.vim
+++ b/autoload/utils.vim
@@ -117,18 +117,18 @@ function! utils#MoveSelection(direction) abort
if a:direction ==# 'up'
if l:start_line == 1
" we can also directly use `normal gv`, see https://stackoverflow.com/q/9724123/6064933
- normal gv
+ normal! gv
return
endif
silent execute printf('%s,%smove-2', l:start_line, l:end_line)
- normal gv
+ normal! gv
elseif a:direction ==# 'down'
if l:end_line == line('$')
- normal gv
+ normal! gv
return
endif
silent execute printf('%s,%smove+%s', l:start_line, l:end_line, l:num_line)
- normal gv
+ normal! gv
endif
endfunction