diff options
| author | jdhao <jdhao@hotmail.com> | 2021-07-13 22:42:40 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-07-13 22:42:40 +0800 |
| commit | 764bd0c2bb14be5995295b35371ff163c81af2ff (patch) | |
| tree | 10c9b5e9c8ca28357bf452c2a2527f470bb82f31 /autoload/utils.vim | |
| parent | 9c434b472e54f653b128f8e89fc7a5520e0201ee (diff) | |
fix: use normal!
Use command normal! to avoid any mapping being accidentally used.
Diffstat (limited to 'autoload/utils.vim')
| -rw-r--r-- | autoload/utils.vim | 8 |
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 |
