aboutsummaryrefslogtreecommitdiff
path: root/forwback.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2017-11-20 06:53:49 +0000
committerXin LI <delphij@FreeBSD.org>2017-11-20 06:53:49 +0000
commitee3dcfe98fdc32918e3476f437b9603983d6d0be (patch)
tree62ec9b28431130ee7fc5037091ea243b4304955f /forwback.c
parent6f90225e8378d85045013553763bd7483670441c (diff)
Vendor import of less v529.vendor/less/v529
Notes
Notes: svn path=/vendor/less/dist/; revision=326007 svn path=/vendor/less/v529/; revision=326008; tag=vendor/less/v529
Diffstat (limited to 'forwback.c')
-rw-r--r--forwback.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/forwback.c b/forwback.c
index dc6cac98afbb..680fa251b12e 100644
--- a/forwback.c
+++ b/forwback.c
@@ -285,7 +285,7 @@ forw(n, pos, force, only_last, nblank)
forw_prompt = 1;
}
- if (nlines == 0 && same_pos_bell)
+ if (nlines == 0 && !ignore_eoi && same_pos_bell)
eof_bell();
else if (do_repaint)
repaint();
@@ -446,15 +446,15 @@ get_back_scroll()
}
/*
- * Get line count of file up to the screen height + 1 char
+ * Return number of displayable lines in the file.
+ * Stop counting at screen height + 1.
*/
public int
get_line_count()
{
int nlines;
- POSITION pos;
+ POSITION pos = ch_zero();
- pos = ch_zero();
for (nlines = 0; nlines <= sc_height; nlines++)
{
pos = forw_line(pos);