aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 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;