top: refine inspect logic for already in-place matches

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2012-12-06 00:00:00 -06:00 committed by Craig Small
parent 3b2b9a95e6
commit 2219c80514

View File

@ -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;