aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-05-16 21:25:32 +0000
committerKim F. Storm <[email protected]>2005-05-16 21:25:32 +0000
commit4ca39724e09e420aeb4f66a308f11707cccf64cd (patch)
treed03b7b1b989961bf7bec21584bcffbba89ed8bd3 /src
parenta605fefc84600e18fcda7f0cc98e8bde41e1d674 (diff)
(adjust_point_for_property): Skip empty overlay string.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 09472e5a5e..a98bc46958 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;