From 231b4b89ae49625673c0d45b1ff6308762501f3a Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 15 Nov 2001 10:31:05 +0000 Subject: [PATCH] (direct_output_forward_char): Fix character/byte position comparison. --- src/ChangeLog | 5 +++++ src/dispnew.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c490f9ca498..d949b9d5678 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-11-15 Gerd Moellmann + + * dispnew.c (direct_output_forward_char): Fix character/byte + position comparison. + 2001-11-12 Jason Rumney * w32fns.c (Fx_open_connection): Only execute once. diff --git a/src/dispnew.c b/src/dispnew.c index 6a161c424ce..81752a66f01 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3741,8 +3741,8 @@ direct_output_forward_char (n) row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); /* Give up if PT is outside of the last known cursor row. */ - if (PT <= MATRIX_ROW_START_BYTEPOS (row) - || PT >= MATRIX_ROW_END_BYTEPOS (row)) + if (PT <= MATRIX_ROW_START_CHARPOS (row) + || PT >= MATRIX_ROW_END_CHARPOS (row)) return 0; set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); -- 2.39.2