# HG changeset patch # User Kenichi Handa # Date 1267065173 -32400 # Node ID e5e850b5ad632c228d1db7c87a4b9ce7861ef08e # Parent 924b8f1769f02431e6606977a6b04e0c90a451f6# Parent d8cd64428fb5ca86e8d7b19cdacfc6afa6398ba5 xdisp.c (reseat_to_string): Fix previous change (bug#5609). diff -r 924b8f1769f0 -r e5e850b5ad63 src/ChangeLog --- 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 + + * 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 924b8f1769f0 -r e5e850b5ad63 src/xdisp.c --- 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); }