From: Richard M. Stallman Date: Wed, 11 Aug 1993 05:24:29 +0000 (+0000) Subject: (direct_output_forward_char): Fix previous change: X-Git-Tag: emacs-19.34~11300 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f24f5ac0cba52614dd6153e689bc1827af432e1;p=emacs.git (direct_output_forward_char): Fix previous change: verify position is in range before calling Fget_text_property, and calculate position properly. --- diff --git a/src/dispnew.c b/src/dispnew.c index db909505f05..06dcebc41dc 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -942,16 +942,18 @@ direct_output_forward_char (n) /* Don't use direct output next to an invisible character since we might need to do something special. */ - XFASTINT (position) = point + n; - if (! NILP (Fget_text_property (position, - Qinvisible, - Fcurrent_buffer ()))) + XFASTINT (position) = point; + if (XFASTINT (position) < ZV + && ! NILP (Fget_text_property (position, + Qinvisible, + Fcurrent_buffer ()))) return; - XFASTINT (position) = point + n - 1; - if (! NILP (Fget_text_property (position, - Qinvisible, - Fcurrent_buffer ()))) + XFASTINT (position) = point - 1; + if (XFASTINT (position) >= BEGV + && ! NILP (Fget_text_property (position, + Qinvisible, + Fcurrent_buffer ()))) return; #endif