Mercurial > emacs
changeset 4551:1abd3007cbb6
(direct_output_forward_char): Fix previous change:
verify position is in range before calling Fget_text_property,
and calculate position properly.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 11 Aug 1993 05:24:29 +0000 |
parents | f189820e7ea7 |
children | 44de5ee465ae |
files | src/dispnew.c |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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