# HG changeset patch # User Richard M. Stallman # Date 745046669 0 # Node ID 1abd3007cbb6c21314cb980fd343be02e06af69e # Parent f189820e7ea7a58d6eeed2af14a9e1ad1f88df33 (direct_output_forward_char): Fix previous change: verify position is in range before calling Fget_text_property, and calculate position properly. diff -r f189820e7ea7 -r 1abd3007cbb6 src/dispnew.c --- a/src/dispnew.c Wed Aug 11 05:23:49 1993 +0000 +++ b/src/dispnew.c Wed Aug 11 05:24:29 1993 +0000 @@ -942,16 +942,18 @@ /* 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