]> granicus.if.org Git - procps-ng/commitdiff
top: refine inspect logic for already in-place matches
authorJim Warner <james.warner@comcast.net>
Thu, 6 Dec 2012 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@enc.com.au>
Tue, 11 Dec 2012 11:54:25 +0000 (22:54 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index a477091145935bece98af76188057aa842f42358..e7bbc558dd7732c7dc51b17e00a0d548fdd6f17e 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -2541,9 +2541,9 @@ static void insp_find_str (int ch, int *col, int *row) {
          xx = insp_find_ofs(xx, yy);
          if (xx < INSP_RLEN(yy)) {
             found = 1;
-            if (xx == *col) {     // matched where we were!
-               ++xx;              // ( was the user maybe )
-               continue;          // ( trying to fool us? )
+            if (xx == *col &&  yy == *row) {     // matched where we were!
+               ++xx;                             // ( was the user maybe )
+               continue;                         // ( trying to fool us? )
             }
             *col = xx;
             *row = yy;