summaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index 7ba9e228f7..09c638e0ce 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3491,6 +3491,18 @@ goto_tabpage(n)
tabpage_T *ttp;
int i;
+ 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));
+ return;
+ }
+
/* If there is only one it can't work. */
if (first_tabpage->tp_next == NULL)
{