diff options
author | Kim F. Storm <storm@cua.dk> | 2005-05-16 21:25:32 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-05-16 21:25:32 +0000 |
commit | 4ca39724e09e420aeb4f66a308f11707cccf64cd (patch) | |
tree | d03b7b1b989961bf7bec21584bcffbba89ed8bd3 /src/keyboard.c | |
parent | a605fefc84600e18fcda7f0cc98e8bde41e1d674 (diff) | |
download | emacs-4ca39724e09e420aeb4f66a308f11707cccf64cd.tar.gz emacs-4ca39724e09e420aeb4f66a308f11707cccf64cd.tar.bz2 emacs-4ca39724e09e420aeb4f66a308f11707cccf64cd.zip |
(adjust_point_for_property): Skip empty overlay string.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 7 |
1 files 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; |