diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-28 21:39:38 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-28 21:40:29 +1200 |
commit | 1450692b4b13329f7dcf4c452e7b8b5811a0ce4c (patch) | |
tree | 021daa3d110d34cdf7980979f59bb517b02ace17 /plugin/scroll_next.vim | |
parent | Merge branch 'release/v0.2.0' into develop (diff) | |
download | vim-scroll-next-1450692b4b13329f7dcf4c452e7b8b5811a0ce4c.tar.gz vim-scroll-next-1450692b4b13329f7dcf4c452e7b8b5811a0ce4c.zip |
Drop Vim 6.x support
Diffstat (limited to 'plugin/scroll_next.vim')
-rw-r--r-- | plugin/scroll_next.vim | 18 |
1 files changed, 2 insertions, 16 deletions
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 <tom@sanctum.geek.nz> " 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! \<PageDown>" - endif -endfunction - " Mapping setup nnoremap <silent> <unique> \ <Plug>(ScrollNext) - \ :<C-U>call <SID>ScrollNext()<CR> + \ :<C-U>call scroll_next#ScrollNext()<CR> |