diff options
author | Kenichi Handa <handa@m17n.org> | 2010-02-25 11:29:35 +0900 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2010-02-25 11:29:35 +0900 |
commit | cc6c7c75bbd87892ff3f956c75f5494d58f3fc33 (patch) | |
tree | e2a714e1ed6cb8ef6ab80d793c6a492858135408 /src/xdisp.c | |
parent | 0ca10bb75f679d96560cd7909d47882a08d14cb5 (diff) | |
download | emacs-cc6c7c75bbd87892ff3f956c75f5494d58f3fc33.tar.gz |
xdisp.c (reseat_to_string): Fix previous change (bug#5609).
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); } |