diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 16:50:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 16:51:55 +1200 |
commit | 831ecd219d88cd4a005e1a9657601803d9b701b9 (patch) | |
tree | c20769dfdecfbe51e8a1cb36bc9fccfc814fa099 /autoload | |
parent | Merge branch 'release/v0.3.0' into develop (diff) | |
download | vim-keep-position-831ecd219d88cd4a005e1a9657601803d9b701b9.tar.gz vim-keep-position-831ecd219d88cd4a005e1a9657601803d9b701b9.zip |
Remove range support
I didn't realise how new the <range> expansion was; it's only in Vim
8.1, by the looks.
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 |