Skip to content

Commit

Permalink
Fix scrolling a line too far on C-PgUp/Dn
Browse files Browse the repository at this point in the history
  • Loading branch information
Sound and Fury committed Sep 23, 2010
1 parent eb50b4c commit 3b805f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ int inputchar(iline *inp, int *state)
{
if(d=='5') // C-PgUp
{
bufs[cbuf].scroll=min(bufs[cbuf].scroll+height-2, bufs[cbuf].filled?bufs[cbuf].nlines-1:bufs[cbuf].ptr-1);
bufs[cbuf].scroll=min(bufs[cbuf].scroll+height-3, bufs[cbuf].filled?bufs[cbuf].nlines-1:bufs[cbuf].ptr-1);
redraw_buffer();
}
else // d=='6' // C-PgDn
{
if(bufs[cbuf].scroll)
{
bufs[cbuf].scroll=max(bufs[cbuf].scroll-(height-2), 0);
bufs[cbuf].scroll=max(bufs[cbuf].scroll-(height-3), 0);
redraw_buffer();
}
}
Expand Down

0 comments on commit 3b805f0

Please sign in to comment.