diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-11-29 10:06:31 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-11-29 10:06:31 +0000 |
commit | 5f2de68ceb3ac6dffbf7c52f0e4761273193c297 (patch) | |
tree | 9f4fed2089d78206ccf5d9b414359104307286e9 /usr.bin/top | |
parent | a637766c50bd7561ced45df912fe61ce66937f00 (diff) |
fix small glitch in displaying process list header; from Mark Lumsden
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/top.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 7d914001184..579f8bc7cdb 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -1,4 +1,4 @@ -/* $OpenBSD: top.c,v 1.64 2007/11/27 13:19:16 otto Exp $ */ +/* $OpenBSD: top.c,v 1.65 2007/11/29 10:06:30 otto Exp $ */ /* * Top users/processes display for Unix @@ -664,22 +664,24 @@ rundisplay(void) ptr = tempbuf; if ((i = atoiwi(ptr)) != Invalid) { if (i > max_topn) { - new_message(MT_standout | MT_delayed, + new_message(MT_standout | + MT_delayed, " This terminal can only " "display %d processes.", max_topn); putr(); - } else if (i == 0) - display_header(No); - else if ((i > topn || i == Infinity) + } + if ((i > topn || i == Infinity) && topn == 0) { /* redraw the header */ display_header(Yes); - } + } else if (i == 0) + display_header(No); topn = i; } else { new_message(MT_standout, - "Processes should be a non-negative number"); + "Processes should be a " + "non-negative number"); putr(); no_command = Yes; } |