summaryrefslogtreecommitdiffstats
path: root/contrib/less/forwback.c
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-05-23 05:51:17 +0000
committerps <ps@FreeBSD.org>2000-05-23 05:51:17 +0000
commit4f86a08dc712d931c98124b30e0d97d63fc21649 (patch)
tree870fabd51c68a3aec2554ef44a5bd75293c9fbae /contrib/less/forwback.c
parentd00f222c77a8ab0c3c81f9d60defbbec4eb69be7 (diff)
downloadFreeBSD-src-4f86a08dc712d931c98124b30e0d97d63fc21649.zip
FreeBSD-src-4f86a08dc712d931c98124b30e0d97d63fc21649.tar.gz
Make less act like more(1) when it is invoked as more.
Obtained from: NetBSD
Diffstat (limited to 'contrib/less/forwback.c')
-rw-r--r--contrib/less/forwback.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/less/forwback.c b/contrib/less/forwback.c
index 722bce55..d8071aa 100644
--- a/contrib/less/forwback.c
+++ b/contrib/less/forwback.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (C) 1984-2000 Mark Nudelman
*
@@ -27,6 +28,7 @@ extern int top_scroll;
extern int quiet;
extern int sc_width, sc_height;
extern int quit_at_eof;
+extern int more_mode;
extern int plusoption;
extern int forw_scroll;
extern int back_scroll;
@@ -142,9 +144,12 @@ forw(n, pos, force, only_last, nblank)
pos_clear();
add_forw_pos(pos);
force = 1;
- if (top_scroll == OPT_ONPLUS || first_time)
- clear();
- home();
+ if (more_mode == 0)
+ {
+ if (top_scroll == OPT_ONPLUS || first_time)
+ clear();
+ home();
+ }
} else
{
clear_bot();
OpenPOWER on IntegriCloud