updated for version 7.0182
diff --git a/src/edit.c b/src/edit.c
index 298ebc3..ab3558a 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -289,6 +289,13 @@
 	return FALSE;
     }
 #endif
+    /* Don't allow changes in the buffer while editing the cmdline.  The
+     * caller of getcmdline() may get confused. */
+    if (cmdline_busy)
+    {
+	EMSG(_(e_secure));
+	return FALSE;
+    }
 
 #ifdef FEAT_INS_EXPAND
     ins_compl_clear();	    /* clear stuff for CTRL-X mode */