xdisp.c (mouse_face_from_string_pos): Initialize the `found'
flag to zero, and exit the outer loop when it's non-zero. Bail
our early if no row in the window belongs to the highlighted
string. Always back up after exiting the second loop.
+2010-10-23 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (mouse_face_from_string_pos): Initialize the `found'
+ flag to zero, and exit the outer loop when it's non-zero. Bail
+ our early if no row in the window belongs to the highlighted
+ string. Always back up after exiting the second loop.
+
2010-10-16 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (fast_find_string_pos): #ifdef away, not used anymore.
struct glyph_row *r;
struct glyph *g, *e;
int gx;
- int found;
+ int found = 0;
/* Find the glyph row with at least one position in the range
[STARTPOS..ENDPOS), and the leftmost glyph in that row whose
dpyinfo->mouse_face_end_col = g - r->glyphs[TEXT_AREA];
dpyinfo->mouse_face_end_x = gx;
}
+ found = 1;
break;
}
+ if (found)
+ break;
}
+ if (!found)
+ return;
+
/* Starting with the next row, look for the first row which does NOT
include any glyphs whose positions are in the range. */
for (++r; r->enabled_p && r->y < yb; ++r)
if (!found)
break;
}
+ r--;
- if (!found)
- r--;
dpyinfo->mouse_face_end_row = r - w->current_matrix->rows;
dpyinfo->mouse_face_end_y = r->y;