From 39ca30f3baefa9e39b339430213babb2cdcaeb7d Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 11 Nov 2005 01:36:46 +0000 Subject: [PATCH] (delete_surrounding_text): Clear cache if necessary. --- src/input.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 1.7.10.4