# HG changeset patch # User Kenichi Handa # Date 1267064975 -32400 # Node ID 7a3076e0d7b63144f71ca72ee56d43080994eca6 # Parent 68454434bdc45601424f7bc56d0b61cbc81210c6 xdisp.c (reseat_to_string): Fix previous change (bug#5609). diff -r 68454434bdc4 -r 7a3076e0d7b6 src/ChangeLog --- a/src/ChangeLog Thu Feb 25 09:56:44 2010 +0900 +++ b/src/ChangeLog Thu Feb 25 11:29:35 2010 +0900 @@ -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 -r 68454434bdc4 -r 7a3076e0d7b6 src/xdisp.c --- a/src/xdisp.c Thu Feb 25 09:56:44 2010 +0900 +++ b/src/xdisp.c Thu Feb 25 11:29:35 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); }