aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-11 05:24:29 +0000
committerRichard M. Stallman1993-08-11 05:24:29 +0000
commit2f24f5ac0cba52614dd6153e689bc1827af432e1 (patch)
tree06e50954c91a6d6e7a05a8e5a57eb1b708fd3cb0 /src
parent5c781212c8c50d560c26258f9b8e102b2688aed3 (diff)
downloademacs-2f24f5ac0cba52614dd6153e689bc1827af432e1.tar.gz
emacs-2f24f5ac0cba52614dd6153e689bc1827af432e1.zip
(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')
-rw-r--r--src/dispnew.c18
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)
942 /* Don't use direct output next to an invisible character 942 /* Don't use direct output next to an invisible character
943 since we might need to do something special. */ 943 since we might need to do something special. */
944 944
945 XFASTINT (position) = point + n; 945 XFASTINT (position) = point;
946 if (! NILP (Fget_text_property (position, 946 if (XFASTINT (position) < ZV
947 Qinvisible, 947 && ! NILP (Fget_text_property (position,
948 Fcurrent_buffer ()))) 948 Qinvisible,
949 Fcurrent_buffer ())))
949 return; 950 return;
950 951
951 XFASTINT (position) = point + n - 1; 952 XFASTINT (position) = point - 1;
952 if (! NILP (Fget_text_property (position, 953 if (XFASTINT (position) >= BEGV
953 Qinvisible, 954 && ! NILP (Fget_text_property (position,
954 Fcurrent_buffer ()))) 955 Qinvisible,
956 Fcurrent_buffer ())))
955 return; 957 return;
956#endif 958#endif
957 959