Skip to content

Commit

Permalink
Do not move screen if we are at the bottom. Match top and bottom ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
cscorley authored and gauteh committed Mar 23, 2014
1 parent 0b9c8bf commit 74370f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sup/modes/line_cursor_mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def cursor_down
call_load_more_callbacks buffer.content_height if @curpos >= lines - [buffer.content_height/2,1].max
return false unless @curpos < lines - 1

if @curpos == botline - 3 and $config[:continuous_scroll]
if @curpos == botline - 3 and @curpos < lines - 3 and $config[:continuous_scroll]
# load more lines, one at a time.
jump_to_line topline + 1
@curpos += 1
Expand Down Expand Up @@ -122,7 +122,7 @@ def cursor_down
def cursor_up
return false unless @curpos > @cursor_top

if @curpos == topline + 3 and $config[:continuous_scroll]
if @curpos == topline + 2 and $config[:continuous_scroll]
jump_to_line topline - 1
@curpos -= 1
unless buffer.dirty?
Expand Down

0 comments on commit 74370f7

Please sign in to comment.