diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-08-11 05:24:29 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-08-11 05:24:29 +0000 |
commit | 83edb7ee844ced9b196e68cc83942a22f3498f9b (patch) | |
tree | e96912e4c46af2e077a8b6a9ec4f1f82dd5b77dd /src/dispnew.c | |
parent | 3def11659d3d819a15973a748c09b1127894e767 (diff) | |
download | emacs-83edb7ee844ced9b196e68cc83942a22f3498f9b.tar.gz |
(direct_output_forward_char): Fix previous change:
verify position is in range before calling Fget_text_property,
and calculate position properly.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 18 |
1 files changed, 10 insertions, 8 deletions
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 |