From bc9447bc283af2fea14ad5b9ea904916070015ee Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 8 Sep 2004 11:37:16 +0000 Subject: [PATCH] (set_cursor_from_row): Also look at 'cursor' property in overlay just before point. --- src/xdisp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.5