]> granicus.if.org Git - procps-ng/commitdiff
top: eliminate task row anomalies with active searches
authorJim Warner <james.warner@comcast.net>
Sun, 30 Dec 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Tue, 1 Jan 2013 01:20:17 +0000 (12:20 +1100)
This potential problem is caused by frequently spawned
and short lived tasks which happen to sort above a row
containing a match from an active Locate request. It's
most likely to be visible when under Forest View mode.

This commit will eliminate a potential duplicated row.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.h

index 8182a56b3b9c84db4676752756d234fe9a948011..489708e9c4e66f287426d951fc35526f72c42238 100644 (file)
--- a/top/top.h
+++ b/top/top.h
@@ -509,6 +509,7 @@ typedef struct WIN_t {
                  but would otherwise have been counted as a Pseudo_row */
 #define POOF(str,cap) do { \
       putp(str); putp(cap); \
+      Pseudo_screen[Pseudo_row * ROWMAXSIZ] = '\0'; \
       if (Pseudo_row + 1 < Screen_rows) ++Pseudo_row; \
    } while (0)