diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 16:52:34 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 16:52:34 +1200 |
commit | 6ffc76012ca5716c272c54c6dce8d783d21cc144 (patch) | |
tree | 7da8c7a0fdf6c801b40bcf5329b0ee0000e5687e /autoload | |
parent | Merge branch 'release/v0.3.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-keep-position-master.tar.gz vim-keep-position-master.zip |
* release/v0.4.0:
Adjust order of command attributes
Remove range support
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/keep_position.vim | 6 |
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 |