patch 7.4.2312
Problem:    Crash when autocommand moves to another tab. (Dominique Pelle)
Solution:   When navigating to another window halfway the :edit command go
            back to the right window.
diff --git a/src/window.c b/src/window.c
index 2f3ec8c..4f99271 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3912,12 +3912,7 @@
     if (text_locked())
     {
 	/* Not allowed when editing the command line. */
-#ifdef FEAT_CMDWIN
-	if (cmdwin_type != 0)
-	    EMSG(_(e_cmdwin));
-	else
-#endif
-	    EMSG(_(e_secure));
+	text_locked_msg();
 	return;
     }