changeset 107226:e5e850b5ad63

xdisp.c (reseat_to_string): Fix previous change (bug#5609).
author Kenichi Handa <handa@m17n.org>
date Thu, 25 Feb 2010 11:32:53 +0900
parents 924b8f1769f0 (current diff) d8cd64428fb5 (diff)
children a83491958b95 627cc62ab211
files
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 24 20:11:28 2010 -0500
+++ b/src/ChangeLog	Thu Feb 25 11:32:53 2010 +0900
@@ -1,3 +1,7 @@
+2010-02-25  Kenichi Handa  <handa@m17n.org>
+
+	* xdisp.c (reseat_to_string): Fix previous change (bug#5609).
+
 2010-02-24  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xterm.c (XTflash): Move declarations before statements.
--- a/src/xdisp.c	Wed Feb 24 20:11:28 2010 -0500
+++ b/src/xdisp.c	Thu Feb 25 11:32:53 2010 +0900
@@ -5610,8 +5610,13 @@
 
   it->stop_charpos = charpos;
   if (s == NULL && it->multibyte_p)
-    composition_compute_stop_pos (&it->cmp_it, charpos, -1, it->end_charpos,
-				  it->string);
+    {
+      EMACS_INT endpos = charpos + SCHARS (it->string);
+      if (endpos > it->end_charpos)
+	endpos = it->end_charpos;
+      composition_compute_stop_pos (&it->cmp_it, charpos, -1, endpos,
+				    it->string);
+    }
   CHECK_IT (it);
 }