diff options
| author | Kim F. Storm | 2005-05-16 21:25:32 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-05-16 21:25:32 +0000 |
| commit | 4ca39724e09e420aeb4f66a308f11707cccf64cd (patch) | |
| tree | d03b7b1b989961bf7bec21584bcffbba89ed8bd3 /src | |
| parent | a605fefc84600e18fcda7f0cc98e8bde41e1d674 (diff) | |
| download | emacs-4ca39724e09e420aeb4f66a308f11707cccf64cd.tar.gz emacs-4ca39724e09e420aeb4f66a308f11707cccf64cd.zip | |
(adjust_point_for_property): Skip empty overlay string.
Diffstat (limited to 'src')
| -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) | |||
| 1947 | ? get_property_and_range (PT, Qdisplay, &val, &beg, &end, Qnil) | 1947 | ? get_property_and_range (PT, Qdisplay, &val, &beg, &end, Qnil) |
| 1948 | : (beg = OVERLAY_POSITION (OVERLAY_START (overlay)), | 1948 | : (beg = OVERLAY_POSITION (OVERLAY_START (overlay)), |
| 1949 | end = OVERLAY_POSITION (OVERLAY_END (overlay)))) | 1949 | end = OVERLAY_POSITION (OVERLAY_END (overlay)))) |
| 1950 | && beg < PT) /* && end > PT <- It's always the case. */ | 1950 | && (beg < PT /* && end > PT <- It's always the case. */ |
| 1951 | || (beg <= PT && STRINGP (val) && SCHARS (val) == 0))) | ||
| 1951 | { | 1952 | { |
| 1952 | xassert (end > PT); | 1953 | xassert (end > PT); |
| 1953 | SET_PT (PT < last_pt ? beg : end); | 1954 | SET_PT (PT < last_pt |
| 1955 | ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg) | ||
| 1956 | : end); | ||
| 1954 | check_composition = check_invisible = 1; | 1957 | check_composition = check_invisible = 1; |
| 1955 | } | 1958 | } |
| 1956 | check_display = 0; | 1959 | check_display = 0; |