# HG changeset patch # User Kenichi Handa # Date 1282697645 -32400 # Node ID 7a86ccf3260e68a785162d9e7fc587d2d9fa273c # Parent 637005c4c3ca28ec4ee7694131e52573bb004bad Fix finding a stop position for composition. diff -r 637005c4c3ca -r 7a86ccf3260e src/ChangeLog --- a/src/ChangeLog Thu Aug 19 07:55:30 2010 +0200 +++ b/src/ChangeLog Wed Aug 25 09:54:05 2010 +0900 @@ -1,3 +1,9 @@ +2010-08-25 Kenichi Handa + + * 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-19 Jan Djärv * nsselect.m (nxatoms_of_nsselect): Use "Selection" and "Secondary". diff -r 637005c4c3ca -r 7a86ccf3260e src/composite.c --- 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) {