summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-07-13 17:41:49 +0000
committerBram Moolenaar <Bram@vim.org>2008-07-13 17:41:49 +0000
commitc236c16d0884c7d6cdc4dbaddb8cb3992085f83e (patch)
tree7d87344cdf07b6b9234abe26ccef39fbbee54f63 /src/mbyte.c
parentb316376b4893ac3ae62f7f33c483b28b7fc147c0 (diff)
downloadvim-git-c236c16d0884c7d6cdc4dbaddb8cb3992085f83e.tar.gz
updated for version 7.2b-000v7.2b.000
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()