From 4ca39724e09e420aeb4f66a308f11707cccf64cd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 16 May 2005 21:25:32 +0000 Subject: [PATCH] (adjust_point_for_property): Skip empty overlay string. --- src/keyboard.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 09472e5a5e6..a98bc469585 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1947,10 +1947,13 @@ adjust_point_for_property (last_pt, modified) ? 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; -- 2.39.2