changeset 62421:68eb1c8b3f80

(adjust_point_for_property): Skip empty overlay string.
author Kim F. Storm <storm@cua.dk>
date Mon, 16 May 2005 21:25:32 +0000
parents de870f134ee0
children 8032449c46c0
files src/keyboard.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Mon May 16 21:25:20 2005 +0000
+++ b/src/keyboard.c	Mon May 16 21:25:32 2005 +0000
@@ -1947,10 +1947,13 @@
 	      ? get_property_and_range (PT, Qdisplay, &val, &beg, &end, Qnil)
 	      : (beg = OVERLAY_POSITION (OVERLAY_START (overlay)),
 		 end = OVERLAY_POSITION (OVERLAY_END (overlay))))
-	  && beg < PT) /* && end > PT   <- It's always the case.  */
+	  && (beg < PT /* && end > PT   <- It's always the case.  */
+	      || (beg <= PT && STRINGP (val) && SCHARS (val) == 0)))
 	{
 	  xassert (end > PT);
-	  SET_PT (PT < last_pt ? beg : end);
+	  SET_PT (PT < last_pt
+		  ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg)
+		  : end);
 	  check_composition = check_invisible = 1;
 	}
       check_display = 0;