Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/less/less in more_mode, do not clear the screen all ...



details:   https://anonhg.NetBSD.org/src/rev/4487472e575e
branches:  trunk
changeset: 471629:4487472e575e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 06 11:53:00 1999 +0000

description:
in more_mode, do not clear the screen all the time, like traditional more.  this fixes ancient PR#227.

diffstat:

 usr.bin/less/less/forwback.c |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (54 lines):

diff -r de0d1ab4091b -r 4487472e575e usr.bin/less/less/forwback.c
--- a/usr.bin/less/less/forwback.c      Tue Apr 06 09:31:40 1999 +0000
+++ b/usr.bin/less/less/forwback.c      Tue Apr 06 11:53:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: forwback.c,v 1.5 1999/04/06 05:57:35 mrg Exp $ */
+/*     $NetBSD: forwback.c,v 1.6 1999/04/06 11:53:00 mrg Exp $ */
 
 /*
  * Copyright (c) 1984,1985,1989,1994,1995,1996,1999  Mark Nudelman
@@ -45,6 +45,7 @@
 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;
@@ -155,10 +156,13 @@
                        pos_clear();
                        add_forw_pos(pos);
                        force = 1;
-                       if (top_scroll == OPT_ONPLUS || first_time)
-                               clear();
-                       home();
-               } else
+                       if (more_mode == 0)
+                       {
+                               if (top_scroll == OPT_ONPLUS || first_time)
+                                       clear();
+                               home();
+                       }
+               } else if (more_mode == 0)
                {
                        clear_bot();
                }
@@ -173,7 +177,7 @@
                        pos_clear();
                        add_forw_pos(pos);
                        force = 1;
-                       if (top_scroll)
+                       if (top_scroll && more_mode == 0)
                        {
                                if (top_scroll == OPT_ONPLUS)
                                        clear();
@@ -241,7 +245,8 @@
                 * start the display after the beginning of the file,
                 * and it is not appropriate to squish in that case.
                 */
-               if (first_time && pos == NULL_POSITION && !top_scroll && 
+               if ((first_time || more_mode) &&
+                   pos == NULL_POSITION && !top_scroll && 
 #if TAGS
                    tagoption == NULL &&
 #endif



Home | Main Index | Thread Index | Old Index