changeset 12361:d3175a3bd8cd v8.0.1060

patch 8.0.1060: when imstyle is one, mapping <Left> breaks preediting commit https://github.com/vim/vim/commit/3971905bac0fe7e7519b35b1e558b4f1de55708d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 5 22:20:46 2017 +0200 patch 8.0.1060: when imstyle is one, mapping <Left> breaks preediting Problem: When imstyle is one, mapping <Left> breaks preediting. Solution: Pass though preediting key-events. (Yasuhiro Matsumoto, closes #2064, closes #2063)
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Sep 2017 22:30:04 +0200
parents 588b8fd2c045
children 4ab904b8b1ee
files src/getchar.c src/mbyte.c src/version.c
diffstat 3 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1598,8 +1598,13 @@ vgetc(void)
       {
 	int did_inc = FALSE;
 
-	if (mod_mask)		/* no mapping after modifier has been read */
+	if (mod_mask
+#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
+	    || im_is_preediting()
+#endif
+		)
 	{
+	    /* no mapping after modifier has been read */
 	    ++no_mapping;
 	    ++allow_keys;
 	    did_inc = TRUE;	/* mod_mask may change value */
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4964,7 +4964,11 @@ im_delete_preedit(void)
 	return;
     }
 
-    if (State & NORMAL)
+    if (State & NORMAL
+#ifdef FEAT_TERMINAL
+	    && !term_use_loop()
+#endif
+       )
     {
 	im_preedit_cursor = 0;
 	return;
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1060,
+/**/
     1059,
 /**/
     1058,