From 2d0576fec7defd57b47218b273d7a3214ca438d1 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 6 Feb 2007 06:07:57 +0000 Subject: [PATCH] (get_preceding_char): Fix previous change. --- src/input.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 1.7.10.4