diff src/misc1.c @ 12293:1ff5e5dfa9b0 v8.0.1026

patch 8.0.1026: GTK on-the-spot input has problems commit https://github.com/vim/vim/commit/5c6dbcb03fa552d7b0e61c8fcf425147eb6bf7d5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 30 22:00:20 2017 +0200 patch 8.0.1026: GTK on-the-spot input has problems Problem: GTK on-the-spot input has problems. (Gerd Wachsmuth) Solution: Support over-the-spot. (Yukihiro Nakadaira, Ketn Takata, closes #1215)
author Christian Brabandt <cb@256bit.org>
date Wed, 30 Aug 2017 22:15:04 +0200
parents d2373927d76d
children 4dba3e4f3b01
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2730,12 +2730,15 @@ skip_to_option_part(char_u *p)
 changed(void)
 {
 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
-    /* The text of the preediting area is inserted, but this doesn't
-     * mean a change of the buffer yet.  That is delayed until the
-     * text is committed. (this means preedit becomes empty) */
-    if (im_is_preediting() && !xim_changed_while_preediting)
-	return;
-    xim_changed_while_preediting = FALSE;
+    if (p_imst == IM_ON_THE_SPOT)
+    {
+	/* The text of the preediting area is inserted, but this doesn't
+	 * mean a change of the buffer yet.  That is delayed until the
+	 * text is committed. (this means preedit becomes empty) */
+	if (im_is_preediting() && !xim_changed_while_preediting)
+	    return;
+	xim_changed_while_preediting = FALSE;
+    }
 #endif
 
     if (!curbuf->b_changed)