* src/cmds.c (internal_self_insert): Use FETCH_BYTE, not
FETCH_CHAR, for a decremented byte position (bug#41520).
* src/xdisp.c (Fwindow_text_pixel_size, trailing_whitespace_p): Ditto.
by spaces so that the remaining text won't move. */
ptrdiff_t actual = PT_BYTE;
actual -= prev_char_len (actual);
- if (FETCH_CHAR (actual) == '\t')
+ if (FETCH_BYTE (actual) == '\t')
/* Rather than add spaces, let's just keep the tab. */
chars_to_delete--;
else
while (bpos > BEGV_BYTE)
{
dec_both (&start, &bpos);
- c = FETCH_CHAR (bpos);
+ c = FETCH_BYTE (bpos);
if (!(c == ' ' || c == '\t'))
break;
}
while (bpos > BEGV_BYTE)
{
dec_both (&end, &bpos);
- c = FETCH_CHAR (bpos);
+ c = FETCH_BYTE (bpos);
if (!(c == ' ' || c == '\t' || c == '\n' || c == '\r'))
break;
}
int c = 0;
while (bytepos < ZV_BYTE
- && (c = FETCH_CHAR (bytepos),
+ && (c = FETCH_BYTE (bytepos),
c == ' ' || c == '\t'))
++bytepos;