Skip to content

Commit

Permalink
continuos_scroll: swap ifing order
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed Mar 23, 2014
1 parent 74370f7 commit 0c2bb3c
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 @curpos < lines - 3 and $config[:continuous_scroll]
if $config[:continuous_scroll] and (@curpos == botline - 3 and @curpos < lines - 3)
# 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 + 2 and $config[:continuous_scroll]
if $config[:continuous_scroll] and (@curpos == topline + 2)
jump_to_line topline - 1
@curpos -= 1
unless buffer.dirty?
Expand Down

0 comments on commit 0c2bb3c

Please sign in to comment.