summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-28 20:47:40 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-28 20:47:40 +0100
commitc5aa55db7e5bc791f99fb15b0f4be0d5dd166f62 (patch)
tree379239757644d0828084afa4ba30c78a5e219a8b
parenta45ff6caba706191b4fe328cab4c742ce17fa779 (diff)
downloadvim-git-c5aa55db7e5bc791f99fb15b0f4be0d5dd166f62.tar.gz
patch 8.0.1356: using simalt in a GUIEnter autocommand inserts charactersv8.0.1356
Problem: Using simalt in a GUIEnter autocommand inserts strange characters. (Chih-Long Chang) Solution: Ignore K_NOP in Insert mode. (closes #2379)
-rw-r--r--src/edit.c4
-rw-r--r--src/ex_getln.c6
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/edit.c b/src/edit.c
index d960de359..bf2cf3140 100644
--- 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. */
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 02d03b4e1..4202b036e 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -417,12 +417,12 @@ getcmdline(
cursorcmd(); /* set the cursor on the right spot */
- /* Get a character. Ignore K_IGNORE, it should not do anything, such
- * as stop completion. */
+ /* Get a character. Ignore K_IGNORE and K_NOP, they should not do
+ * anything, such as stop completion. */
do
{
c = safe_vgetc();
- } while (c == K_IGNORE);
+ } while (c == K_IGNORE || c == K_NOP);
if (KeyTyped)
{
diff --git a/src/version.c b/src/version.c
index 0be4be46b..50e3f1600 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1356,
+/**/
1355,
/**/
1354,