From f657bbf68b814be8f8cf4c57cdc8d1d5218ab9c9 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 16 Oct 2000 07:28:24 +0000 Subject: [PATCH] (Fconstrain_to_field): Check carefully for field boundaries if either OLD_POS or NEW_POS has a non-nil field property, even if they're the same. --- src/ChangeLog | 6 ++++++ src/editfns.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f224dc1930b..39d7e0d7450 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-10-16 Miles Bader + + * editfns.c (Fconstrain_to_field): Check carefully for field + boundaries if either OLD_POS or NEW_POS has a non-nil field + property, even if they're the same. + 2000-10-16 Kenichi Handa * xterm.c (x_draw_box_rect): Fix the calculation of width and diff --git a/src/editfns.c b/src/editfns.c index 4f7a7c7db1f..57dbdaae0cc 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -612,7 +612,8 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.") if (NILP (Vinhibit_field_text_motion) && !EQ (new_pos, old_pos) - && !char_property_eq (Qfield, new_pos, old_pos) + && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) + || !NILP (Fget_char_property (old_pos, Qfield, Qnil))) && (NILP (inhibit_capture_property) || NILP (Fget_char_property(old_pos, inhibit_capture_property, Qnil)))) /* NEW_POS is not within the same field as OLD_POS; try to -- 2.39.2