From: handa Date: Fri, 11 Nov 2005 01:36:46 +0000 (+0000) Subject: (delete_surrounding_text): Clear cache if necessary. X-Git-Tag: REL-1-3-0~80 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=39ca30f3baefa9e39b339430213babb2cdcaeb7d;p=m17n%2Fm17n-lib.git (delete_surrounding_text): Clear cache if necessary. --- diff --git a/src/input.c b/src/input.c index 1e47e03..83891b1 100644 --- a/src/input.c +++ b/src/input.c @@ -488,9 +488,15 @@ get_surrounding_text (MInputContext *ic, int len) static void delete_surrounding_text (MInputContext *ic, int pos) { + MInputContextInfo *ic_info = (MInputContextInfo *) ic->info; + mplist_push (ic->plist, Minteger, (void *) pos); minput__callback (ic, Minput_delete_surrounding_text); mplist_pop (ic->plist); + if (pos < 0) + M17N_OBJECT_UNREF (ic_info->preceding_text); + else if (pos > 0) + M17N_OBJECT_UNREF (ic_info->following_text); } static int