aboutsummaryrefslogtreecommitdiff
path: root/contrib/less/jump.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/less/jump.c')
-rw-r--r--contrib/less/jump.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/less/jump.c b/contrib/less/jump.c
index 6e0c90dbcc10..585d9b209e6d 100644
--- a/contrib/less/jump.c
+++ b/contrib/less/jump.c
@@ -31,6 +31,7 @@ extern int top_scroll;
jump_forw()
{
POSITION pos;
+ POSITION end_pos;
if (ch_end_seek())
{
@@ -42,11 +43,17 @@ jump_forw()
* Go back one line from the end of the file
* to get to the beginning of the last line.
*/
- pos = back_line(ch_tell());
+ pos_clear();
+ end_pos = ch_tell();
+ pos = back_line(end_pos);
if (pos == NULL_POSITION)
jump_loc((POSITION)0, sc_height-1);
else
+ {
jump_loc(pos, sc_height-1);
+ if (position(sc_height-1) != end_pos)
+ repaint();
+ }
}
/*