From: handa Date: Tue, 6 Feb 2007 06:07:57 +0000 (+0000) Subject: (get_preceding_char): Fix previous change. X-Git-Tag: FLT-base~140 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2d0576fec7defd57b47218b273d7a3214ca438d1;p=m17n%2Fm17n-lib.git (get_preceding_char): Fix previous change. --- diff --git a/src/input.c b/src/input.c index cf4bad2..091e7f5 100644 --- a/src/input.c +++ b/src/input.c @@ -552,6 +552,8 @@ get_preceding_char (MInputContext *ic, int pos) len = mtext_nchars (ic_info->preceding_text); if (pos <= len) return mtext_ref_char (ic_info->preceding_text, len - pos); + if (ic->produced && mtext_len (ic->produced) >= pos - len) + return mtext_ref_char (ic->produced, len + mtext_len (ic->produced) - pos); } mt = get_surrounding_text (ic, - pos); if (! mt)