# HG changeset patch # User Kenichi Handa # Date 1282709242 -32400 # Node ID 0ecdffce3acabe18b33c5a864012968d2f396bac # Parent e49f8c56fca84242be68eccbd36850a2c67be02e# Parent 19fca2eb1b9fb8edb8f7f2b0fffc87c8de480759 Fix finding a stop position for composition. diff -r e49f8c56fca8 -r 0ecdffce3aca src/ChangeLog --- 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 + + * 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 * keyboard.c (command_loop_1): Don't clobber primary selection diff -r e49f8c56fca8 -r 0ecdffce3aca src/composite.c --- 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) {