aboutsummaryrefslogtreecommitdiff
path: root/plugin/move.vim
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-09-15 20:54:46 +0000
committerJosh Rahm <rahm@google.com>2022-09-15 20:54:46 +0000
commit534f8ccabd777d419fc88aed28c7dc10a6637392 (patch)
treed7b5ab9e47e200f64e94fed457441534a15c70bc /plugin/move.vim
parent445bdd5b7c8794b7961926dbe660970ff5df5373 (diff)
downloadfieldmarshal.vim-534f8ccabd777d419fc88aed28c7dc10a6637392.tar.gz
fieldmarshal.vim-534f8ccabd777d419fc88aed28c7dc10a6637392.tar.bz2
fieldmarshal.vim-534f8ccabd777d419fc88aed28c7dc10a6637392.zip
fieldmarshal: some minor changes.
Diffstat (limited to 'plugin/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