aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-09-16 01:24:13 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-09-16 01:24:13 -0600
commitb7542bfb27673a2cd1c3c1836739f1b18f450b13 (patch)
tree922b9d51844a81456c8d1dd54cda8aa0ed164f51
parentbf09ff08e0f45b690e48bf6b1a5009423aab1bd5 (diff)
downloadfieldmarshal.vim-b7542bfb27673a2cd1c3c1836739f1b18f450b13.tar.gz
fieldmarshal.vim-b7542bfb27673a2cd1c3c1836739f1b18f450b13.tar.bz2
fieldmarshal.vim-b7542bfb27673a2cd1c3c1836739f1b18f450b13.zip
move.vim: minor change to move.vim.
-rw-r--r--plugin/move.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugin/move.vim b/plugin/move.vim
index 88680cd..aa89f40 100644
--- a/plugin/move.vim
+++ b/plugin/move.vim
@@ -50,9 +50,14 @@ function! s:inner_next(operator, ai, open, close) abort
if v:operator =~ "[cd]"
" Cheese a 0-width by inserting a space to then immediately delete for d and c operators.
exec "normal! i \<esc>v"
- else
- " Other operations, just reset the position to what it was before.
+ elseif v:operator =~ "[y]"
+ " Yank operation, don't do anything.
call setpos('.', opos)
+ else
+ let [a, l, c, b] = getpos(".")
+ call setpos("'<", [a, l, c, b])
+ call setpos("'>", [a, l, c-1, b])
+ normal! gv
endif
return
endif