summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index d6edf201e..38bec9d8b 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3454,6 +3454,7 @@ init_preedit_start_col(void)
# if defined(HAVE_GTK2) && !defined(PROTO)
static int im_is_active = FALSE; /* IM is enabled for current mode */
+static int preedit_is_active = FALSE;
static int im_preedit_cursor = 0; /* cursor offset in characters */
static int im_preedit_trailing = 0; /* number of characters after cursor */
@@ -3686,7 +3687,9 @@ im_preedit_start_cb(GtkIMContext *context, gpointer data)
#endif
im_is_active = TRUE;
+ preedit_is_active = TRUE;
gui_update_cursor(TRUE, FALSE);
+ im_show_info();
}
/*
@@ -3707,9 +3710,11 @@ im_preedit_end_cb(GtkIMContext *context, gpointer data)
#if 0
/* Removal of this line suggested by Takuhiro Nishioka. Fixes that IM was
- * switched off unintentionally. */
+ * switched off unintentionally. We now use preedit_is_active (added by
+ * SungHyun Nam). */
im_is_active = FALSE;
#endif
+ preedit_is_active = FALSE;
gui_update_cursor(TRUE, FALSE);
im_show_info();
}
@@ -5723,6 +5728,14 @@ im_get_status()
# endif /* !HAVE_GTK2 */
+# if defined(HAVE_GTK2) || defined(PROTO)
+ int
+preedit_get_status(void)
+{
+ return preedit_is_active;
+}
+# endif
+
# if defined(FEAT_GUI_GTK) || defined(PROTO)
int
im_is_preediting()