summaryrefslogtreecommitdiffstats
path: root/contrib/less/jump.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-09 01:35:27 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-09 01:35:27 +0000
commit810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2 (patch)
tree5e0628caeff31611fab89dbdf72053148a59a873 /contrib/less/jump.c
parent8583a840068803e7fd9e0fc2452605bca6e822d8 (diff)
downloadFreeBSD-src-810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2.zip
FreeBSD-src-810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2.tar.gz
Update to less v429.
Diffstat (limited to 'contrib/less/jump.c')
-rw-r--r--contrib/less/jump.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/contrib/less/jump.c b/contrib/less/jump.c
index 585d9b2..801a833 100644
--- a/contrib/less/jump.c
+++ b/contrib/less/jump.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2007 Mark Nudelman
+ * Copyright (C) 1984-2008 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -16,7 +16,6 @@
#include "less.h"
#include "position.h"
-extern int hit_eof;
extern int jump_sline;
extern int squished;
extern int screen_trashed;
@@ -38,6 +37,12 @@ jump_forw()
error("Cannot seek to end of file", NULL_PARG);
return;
}
+ /*
+ * Note; lastmark will be called later by jump_loc, but it fails
+ * because the position table has been cleared by pos_clear below.
+ * So call it here before calling pos_clear.
+ */
+ lastmark();
/*
* Position the last line in the file at the last screen line.
* Go back one line from the end of the file
@@ -194,8 +199,10 @@ jump_loc(pos, sline)
forw(nline, position(BOTTOM_PLUS_ONE), 1, 0, 0);
else
back(-nline, position(TOP), 1, 0);
+#if HILITE_SEARCH
if (show_attn)
repaint_hilite(1);
+#endif
return;
}
@@ -233,8 +240,10 @@ jump_loc(pos, sline)
* that we can just scroll there after all.
*/
forw(sc_height-sline+nline-1, bpos, 1, 0, 0);
+#if HILITE_SEARCH
if (show_attn)
repaint_hilite(1);
+#endif
return;
}
pos = back_line(pos);
@@ -250,7 +259,6 @@ jump_loc(pos, sline)
}
}
lastmark();
- hit_eof = 0;
squished = 0;
screen_trashed = 0;
forw(sc_height-1, pos, 1, 0, sline-nline);
@@ -282,8 +290,10 @@ jump_loc(pos, sline)
* that we can just scroll there after all.
*/
back(nline+1, tpos, 1, 0);
+#if HILITE_SEARCH
if (show_attn)
repaint_hilite(1);
+#endif
return;
}
}
OpenPOWER on IntegriCloud