Mercurial > emacs
changeset 109975:0ecdffce3aca
Fix finding a stop position for composition.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 25 Aug 2010 13:07:22 +0900 |
parents | e49f8c56fca8 (current diff) 19fca2eb1b9f (diff) |
children | 272a81ae14c6 |
files | |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Aug 24 23:27:58 2010 -0300 +++ b/src/ChangeLog Wed Aug 25 13:07:22 2010 +0900 @@ -1,3 +1,9 @@ +2010-08-25 Kenichi Handa <handa@m17n.org> + + * composite.c (composition_compute_stop_pos): In forward search, + pay attention to the possibility that some character after ENDPOS + will be composed with charactrs before ENDPOS. + 2010-08-24 Chong Yidong <cyd@stupidchicken.com> * keyboard.c (command_loop_1): Don't clobber primary selection
--- a/src/composite.c Tue Aug 24 23:27:58 2010 -0300 +++ b/src/composite.c Wed Aug 25 13:07:22 2010 +0900 @@ -1091,6 +1091,16 @@ } } } + if (charpos == endpos) + { + /* We couldn't find a composition point before ENDPOS. But, + some character after ENDPOS may be composed with + characters before ENDPOS. So, we should stop at the safe + point. */ + charpos = endpos - MAX_AUTO_COMPOSITION_LOOKBACK; + if (charpos < start) + charpos = start; + } } else if (charpos > endpos) {