]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a typo that caused crashes in redisplay.
authorEli Zaretskii <eliz@gnu.org>
Wed, 12 Sep 2012 17:18:33 +0000 (20:18 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 12 Sep 2012 17:18:33 +0000 (20:18 +0300)
 src/xdisp.c (compute_stop_pos_backwards): Fix a typo that caused crashes while
 scrolling through multibyte text.

src/ChangeLog
src/xdisp.c

index 39bdd1911882b6a4cfe5ef973815a8ab28f76cf0..6b5b6e1455ddb89540f4e770fe0ed4de1bc98d92 100644 (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>
 
index 3fab4b54cf03aa7d109f6fc05d3b1789d4d9ca10..c5962541cb674e79b453ebef67bf7e93a759dc3b 100644 (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?  */