comparison src/dispnew.c @ 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 98605d0ea3cf
children 1fc792473491
comparison
equal deleted inserted replaced
4550:f189820e7ea7 4551:1abd3007cbb6
940 940
941 #ifdef USE_TEXT_PROPERTIES 941 #ifdef USE_TEXT_PROPERTIES
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
958 FRAME_CURSOR_X (frame) += n; 960 FRAME_CURSOR_X (frame) += n;
959 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (frame); 961 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (frame);