aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index b553a213e6c..fc5b6c117f5 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3304,8 +3304,17 @@ buffer_chars_equal (struct context *ctx,
3304 eassert (pos_b >= BUF_BEGV (ctx->buffer_b)); 3304 eassert (pos_b >= BUF_BEGV (ctx->buffer_b));
3305 eassert (pos_b < BUF_ZV (ctx->buffer_b)); 3305 eassert (pos_b < BUF_ZV (ctx->buffer_b));
3306 3306
3307 return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, pos_a) 3307 ptrdiff_t bpos_a =
3308 == BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, pos_b); 3308 NILP (BVAR (ctx->buffer_a, enable_multibyte_characters))
3309 ? pos_a
3310 : buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
3311 ptrdiff_t bpos_b =
3312 NILP (BVAR (ctx->buffer_b, enable_multibyte_characters))
3313 ? pos_b
3314 : buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
3315
3316 return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, bpos_a)
3317 == BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, bpos_b);
3309} 3318}
3310 3319
3311 3320