Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/top/dist Don't die if we resize to smaller than...



details:   https://anonhg.NetBSD.org/src/rev/58708a9b5a4a
branches:  trunk
changeset: 795947:58708a9b5a4a
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 13 20:06:41 2014 +0000

description:
Don't die if we resize to smaller than Y_LINES. The display could do better,
but it recovers if we grow.

diffstat:

 external/bsd/top/dist/display.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r c0805b94eb44 -r 58708a9b5a4a external/bsd/top/dist/display.c
--- a/external/bsd/top/dist/display.c   Tue May 13 19:58:23 2014 +0000
+++ b/external/bsd/top/dist/display.c   Tue May 13 20:06:41 2014 +0000
@@ -723,8 +723,9 @@
 
     /* adjust total lines on screen to lines available for procs */
     if (top_lines < y_procs)
-       return -1;
-    top_lines -= y_procs;
+       top_lines = 0;
+    else
+       top_lines -= y_procs;
 
     /* return number of lines available */
     return top_lines;



Home | Main Index | Thread Index | Old Index