changeset 57001:01ad85e53516

(set_cursor_from_row): Also look at 'cursor' property in overlay just before point.
author Kim F. Storm <storm@cua.dk>
date Wed, 08 Sep 2004 11:37:16 +0000
parents 6f9c4809aa7f
children 5ce2d0959cd2
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Sep 08 11:37:02 2004 +0000
+++ b/src/xdisp.c	Wed Sep 08 11:37:16 2004 +0000
@@ -10709,7 +10709,12 @@
 		      (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;
 		}