Mercurial > emacs
diff src/composite.c @ 109972:7a86ccf3260e
Fix finding a stop position for composition.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Wed, 25 Aug 2010 09:54:05 +0900 |
| parents | 228a5fa4eda0 |
| children | 26e31bcc4b06 |
line wrap: on
line diff
--- a/src/composite.c Thu Aug 19 07:55:30 2010 +0200 +++ b/src/composite.c Wed Aug 25 09:54:05 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) {
