From 1450692b4b13329f7dcf4c452e7b8b5811a0ce4c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 28 May 2019 21:39:38 +1200 Subject: Drop Vim 6.x support --- autoload/scroll_next.vim | 9 +++++++++ doc/scroll_next.txt | 6 ++---- plugin/scroll_next.vim | 18 ++---------------- 3 files changed, 13 insertions(+), 20 deletions(-) create mode 100644 autoload/scroll_next.vim diff --git a/autoload/scroll_next.vim b/autoload/scroll_next.vim new file mode 100644 index 0000000..8758208 --- /dev/null +++ b/autoload/scroll_next.vim @@ -0,0 +1,9 @@ +" Check visibility of last line and flick to :next if appropriate, or just +" page forward with PageDown +function! scroll_next#ScrollNext() abort + if line('w$') == line('$') + silent! next + else + execute "normal! \" + endif +endfunction diff --git a/doc/scroll_next.txt b/doc/scroll_next.txt index c53bbfb..af187e8 100644 --- a/doc/scroll_next.txt +++ b/doc/scroll_next.txt @@ -1,4 +1,4 @@ -*scroll_next.txt* For Vim version 6.0 Last change: 2018 Aug 15 +*scroll_next.txt* For Vim version 7.0 Last change: 2019 May 28 DESCRIPTION *scroll_next* @@ -11,9 +11,7 @@ limited keyboards, such as a mobile phone terminal client. REQUIREMENTS *scroll_next-requirements* -This plugin only loads if 'compatible' is not set. It works on |version6| and -newer. If you have |version7| then you don't have to hit the last line of the -buffer; it just has to be visible in the window. +This plugin only loads if 'compatible' is not set. MAPPINGS *scroll_next-mappings* diff --git a/plugin/scroll_next.vim b/plugin/scroll_next.vim index 8f09b24..4535223 100644 --- a/plugin/scroll_next.vim +++ b/plugin/scroll_next.vim @@ -5,26 +5,12 @@ " Author: Tom Ryder " License: Same as Vim itself " -if exists('loaded_scroll_next') || &compatible - finish -endif -if v:version < 600 +if exists('loaded_scroll_next') || &compatible || v:version < 700 finish endif let loaded_scroll_next = 1 -" Check visibility of last line (Vim >=7.0) or cursor presence on last line -" and flick to :next if appropriate, or just page forward with PageDown -function! s:ScrollNext() abort - if line('.') == line('$') - \ || line('w$') == line('$') - silent! next - else - execute "normal! \" - endif -endfunction - " Mapping setup nnoremap \ (ScrollNext) - \ :call ScrollNext() + \ :call scroll_next#ScrollNext() -- cgit v1.2.3 From 6d72ce55ba88fc9338f22817ace7dfa950ebf2d6 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 28 May 2019 21:41:06 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0ea3a94..0d91a54 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 +0.3.0 -- cgit v1.2.3