From: Kim F. Storm Date: Wed, 8 Sep 2004 11:37:16 +0000 (+0000) Subject: (set_cursor_from_row): Also look at 'cursor' property in X-Git-Tag: ttn-vms-21-2-B4~5006 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bc9447bc283af2fea14ad5b9ea904916070015ee;p=emacs.git (set_cursor_from_row): Also look at 'cursor' property in overlay just before point. --- diff --git a/src/xdisp.c b/src/xdisp.c index 4de7166589d..bae84d548c0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10709,7 +10709,12 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) (pos == 0 /* From overlay */ || pos == pt_old))) { - cursor_from_overlay_pos = pos == 0 ? last_pos : 0; + /* Estimate overlay buffer position from the buffer + positions of the glyphs before and after the overlay. + Add 1 to last_pos so that if point corresponds to the + glyph right after the overlay, we still use a 'cursor' + property found in that overlay. */ + cursor_from_overlay_pos = pos == 0 ? last_pos+1 : 0; cursor = glyph; cursor_x = x; }