From 831ecd219d88cd4a005e1a9657601803d9b701b9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 11 Jun 2019 16:50:59 +1200 Subject: Remove range support I didn't realise how new the expansion was; it's only in Vim 8.1, by the looks. --- autoload/keep_position.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'autoload') 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 -- cgit v1.2.3