diff --git a/src/dispnew.c b/src/dispnew.c index 432cffea4b9..b348cefe134 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -953,17 +953,17 @@ direct_output_forward_char (n) XFASTINT (position) = point; if (XFASTINT (position) < ZV - && ! NILP (Fget_text_property (position, + && ! NILP (Fget_char_property (position, Qinvisible, - Fcurrent_buffer ()))) - return; + selected_window))) + return 0; XFASTINT (position) = point - 1; if (XFASTINT (position) >= BEGV - && ! NILP (Fget_text_property (position, + && ! NILP (Fget_char_property (position, Qinvisible, - Fcurrent_buffer ()))) - return; + selected_window))) + return 0; #endif FRAME_CURSOR_X (frame) += n;