# HG changeset patch # User Kim F. Storm # Date 1109070258 0 # Node ID 256e23b599d42ba10ca2db49b6b770fe4c35766a # Parent 150efcb3a0d8acfe1fa7c56e7bfbbf1b474eff77 (fast_find_position): Fix search for start of overlay. diff -r 150efcb3a0d8 -r 256e23b599d4 src/xdisp.c --- a/src/xdisp.c Tue Feb 22 11:04:07 2005 +0000 +++ b/src/xdisp.c Tue Feb 22 11:04:18 2005 +0000 @@ -20775,7 +20775,7 @@ 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 @@ 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; }