]> git.eshelyaron.com Git - emacs.git/commitdiff
(fast_find_position): Fix search for start of overlay.
authorKim F. Storm <storm@cua.dk>
Tue, 22 Feb 2005 11:04:18 +0000 (11:04 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 22 Feb 2005 11:04:18 +0000 (11:04 +0000)
src/xdisp.c

index eb1a7d75fcabfb3d3afba44f7b2fd7f7d6cb4d64..dd10551d5fae14f20e92cbc510a479bd25a84150 100644 (file)
@@ -20775,7 +20775,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
      have a STOP object and previous row's end glyph came from STOP.  */
   if (!NILP (stop))
     {
-      struct glyph_row *prev = row-1;
+      struct glyph_row *prev;
       while ((prev = row - 1, prev >= first)
             && MATRIX_ROW_END_CHARPOS (prev) == charpos
             && prev->used[TEXT_AREA] > 0)
@@ -20784,8 +20784,8 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop)
          glyph = end + prev->used[TEXT_AREA];
          while (--glyph >= end
                 && INTEGERP (glyph->object));
-         if (glyph >= end
-             && !EQ (stop, glyph->object))
+         if (glyph < end
+             || !EQ (stop, glyph->object))
            break;
          row = prev;
        }