Skip to content

Commit

Permalink
Make ^F scroll past EOL
Browse files Browse the repository at this point in the history
See: #11
  • Loading branch information
subnut committed Oct 31, 2020
1 parent 74fef37 commit b2fe2b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autoload/smoothie.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
let s:ctrl_f_invoked = v:false

if !exists('g:smoothie_update_interval')
""
" Time (in milliseconds) between subseqent screen/cursor postion updates.
Expand Down Expand Up @@ -59,6 +61,9 @@ function s:step_down()
endif
call s:execute_preserving_scroll("normal! 1\<C-D>")
return 0
elseif s:ctrl_f_invoked && winline() > 1
call s:execute_preserving_scroll("normal! \<C-E>")
return 0
else
return 1
endif
Expand Down Expand Up @@ -199,7 +204,9 @@ endfunction
""
" Smooth equivalent to ^F.
function smoothie#forwards()
let s:ctrl_f_invoked = v:true
call s:update_target(winheight(0) * v:count1)
let s:ctrl_f_invoked = v:false
endfunction

""
Expand Down

0 comments on commit b2fe2b8

Please sign in to comment.