From: Kenichi Handa Date: Thu, 25 Feb 2010 02:29:35 +0000 (+0900) Subject: xdisp.c (reseat_to_string): Fix previous change (bug#5609). X-Git-Tag: emacs-pretest-23.1.93~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc6c7c75bbd87892ff3f956c75f5494d58f3fc33;p=emacs.git xdisp.c (reseat_to_string): Fix previous change (bug#5609). --- diff --git a/src/ChangeLog b/src/ChangeLog index 542a0781783..0b67340c1fd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-02-25 Kenichi Handa + + * xdisp.c (reseat_to_string): Fix previous change (bug#5609). + 2010-02-24 Jan Djärv * xterm.c (XTflash): Move declarations before statements. diff --git a/src/xdisp.c b/src/xdisp.c index 8e356224c8a..1a078edd074 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5610,8 +5610,13 @@ reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) 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); }