Commit 2f24f5ac authored by Richard M. Stallman's avatar Richard M. Stallman

(direct_output_forward_char): Fix previous change:

verify position is in range before calling Fget_text_property,
and calculate position properly.
parent 5c781212
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment