summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 2b43dc51f..84cb39130 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8085,6 +8085,11 @@ ex_normal(eap)
ex_startinsert(eap)
exarg_T *eap;
{
+ /* Ignore the command when already in Insert mode. Inserting an
+ * expression register that invokes a function can do this. */
+ if (State & INSERT)
+ return;
+
if (eap->forceit)
{
coladvance((colnr_T)MAXCOL);