aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-11 16:52:34 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-11 16:52:34 +1200
commit6ffc76012ca5716c272c54c6dce8d783d21cc144 (patch)
tree7da8c7a0fdf6c801b40bcf5329b0ee0000e5687e /autoload
parentMerge branch 'release/v0.3.0' (diff)
parentBump VERSION (diff)
downloadvim-keep-position-master.tar.gz
vim-keep-position-master.zip
Merge branch 'release/v0.4.0'HEADv0.4.0master
* release/v0.4.0: Adjust order of command attributes Remove range support
Diffstat (limited to 'autoload')
-rw-r--r--autoload/keep_position.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/autoload/keep_position.vim b/autoload/keep_position.vim
index 7ff0228..a2f2ed4 100644
--- a/autoload/keep_position.vim
+++ b/autoload/keep_position.vim
@@ -1,7 +1,5 @@
-function! keep_position#(command, range, start, end) abort
+function! keep_position#(command) abort
let view = winsaveview()
execute a:command
- if !a:range || (a:start >= line("'[") && a:end <= line("']"))
- call winrestview(view)
- endif
+ call winrestview(view)
endfunction