diff src/ex_getln.c @ 10082:7fc6103c6651 v7.4.2312

commit https://github.com/vim/vim/commit/5a49789a9b1f6447aeafbbbdd5b235dd10c471d5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 3 16:29:04 2016 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Sep 2016 16:30:06 +0200
parents 4aead6a9b7a9
children 61dc69646af6
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2133,12 +2133,17 @@ text_locked(void)
     void
 text_locked_msg(void)
 {
+    EMSG(_(get_text_locked_msg()));
+}
+
+    char_u *
+get_text_locked_msg(void)
+{
 #ifdef FEAT_CMDWIN
     if (cmdwin_type != 0)
-	EMSG(_(e_cmdwin));
-    else
-#endif
-	EMSG(_(e_secure));
+	return e_cmdwin;
+#endif
+    return e_secure;
 }
 
 #if defined(FEAT_AUTOCMD) || defined(PROTO)