Fix a typo that caused crashes in redisplay.

src/xdisp.c (compute_stop_pos_backwards): Fix a typo that caused crashes while
 scrolling through multibyte text.
This commit is contained in:
Eli Zaretskii 2012-09-12 20:18:33 +03:00
parent aa36e4d28b
commit f2016beaf3
2 changed files with 3 additions and 1 deletions

View file

@ -5,6 +5,8 @@
that fails, clear the desired glyph matrix before returning a
failure indication to the caller. Fixes leaving garbled display
when fast scrolling with a down-key. (Bug#12403)
(compute_stop_pos_backwards): Fix a typo that caused crashes while
scrolling through multibyte text.
2012-09-12 Jan Djärv <jan.h.d@swipnet.se>

View file

@ -7669,7 +7669,7 @@ compute_stop_pos_backwards (struct it *it)
{
it->end_charpos = min (charpos + 1, ZV);
charpos = max (charpos - SCAN_BACK_LIMIT, BEGV);
SET_TEXT_POS (pos, charpos, BYTE_TO_CHAR (charpos));
SET_TEXT_POS (pos, charpos, CHAR_TO_BYTE (charpos));
reseat_1 (it, pos, 0);
compute_stop_pos (it);
/* We must advance forward, right? */