diff src/edit.c @ 12960:004bc78c88e6 v8.0.1356

patch 8.0.1356: using simalt in a GUIEnter autocommand inserts characters commit https://github.com/vim/vim/commit/c5aa55db7e5bc791f99fb15b0f4be0d5dd166f62 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 28 20:47:40 2017 +0100 patch 8.0.1356: using simalt in a GUIEnter autocommand inserts characters Problem: Using simalt in a GUIEnter autocommand inserts strange characters. (Chih-Long Chang) Solution: Ignore K_NOP in Insert mode. (closes #2379)
author Christian Brabandt <cb@256bit.org>
date Tue, 28 Nov 2017 21:00:07 +0100
parents 85a601f985ab
children 808625d4b71b
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -781,7 +781,7 @@ edit(
 #endif
 
 	/*
-	 * Get a character for Insert mode.  Ignore K_IGNORE.
+	 * Get a character for Insert mode.  Ignore K_IGNORE and K_NOP.
 	 */
 	if (c != K_CURSORHOLD)
 	    lastc = c;		/* remember the previous char for CTRL-D */
@@ -798,7 +798,7 @@ edit(
 	    do
 	    {
 		c = safe_vgetc();
-	    } while (c == K_IGNORE);
+	    } while (c == K_IGNORE || c == K_NOP);
 
 #ifdef FEAT_AUTOCMD
 	/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */