Skip to content

Commit c5aa55d

Browse files
committed
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)
1 parent a45ff6c commit c5aa55d

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/edit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ edit(
781781
#endif
782782

783783
/*
784-
* Get a character for Insert mode. Ignore K_IGNORE.
784+
* Get a character for Insert mode. Ignore K_IGNORE and K_NOP.
785785
*/
786786
if (c != K_CURSORHOLD)
787787
lastc = c; /* remember the previous char for CTRL-D */
@@ -798,7 +798,7 @@ edit(
798798
do
799799
{
800800
c = safe_vgetc();
801-
} while (c == K_IGNORE);
801+
} while (c == K_IGNORE || c == K_NOP);
802802

803803
#ifdef FEAT_AUTOCMD
804804
/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */

src/ex_getln.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,12 @@ getcmdline(
417417

418418
cursorcmd(); /* set the cursor on the right spot */
419419

420-
/* Get a character. Ignore K_IGNORE, it should not do anything, such
421-
* as stop completion. */
420+
/* Get a character. Ignore K_IGNORE and K_NOP, they should not do
421+
* anything, such as stop completion. */
422422
do
423423
{
424424
c = safe_vgetc();
425-
} while (c == K_IGNORE);
425+
} while (c == K_IGNORE || c == K_NOP);
426426

427427
if (KeyTyped)
428428
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1356,
774776
/**/
775777
1355,
776778
/**/

0 commit comments

Comments
 (0)