summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-01-26 21:35:08 +0100
committerBram Moolenaar <Bram@vim.org>2021-01-26 21:35:08 +0100
commitbb4b93ed85726c3921596ca267f531c8c94d819a (patch)
tree6051a56c41cb1482ff005812e6f07187193be6cf /src/ex_getln.c
parentce0370d9e67df80c62ff033aa8ca2dbe86841de9 (diff)
patch 8.2.2413: crash when using :all while using a cmdline windowv8.2.2413
Problem: Crash when using :all while using a cmdline window. (Zdenek Dohnal) Solution: Disallow :all from the cmdline window.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index a3e1f4995c..5430014765 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4205,6 +4205,9 @@ open_cmdwin(void)
// Don't let quitting the More prompt make this fail.
got_int = FALSE;
+ // Set "cmdwin_type" before any autocommands may mess things up.
+ cmdwin_type = get_cmdline_type();
+
// Create the command-line buffer empty.
if (do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL) == FAIL)
{
@@ -4213,7 +4216,6 @@ open_cmdwin(void)
ga_clear(&winsizes);
return Ctrl_C;
}
- cmdwin_type = get_cmdline_type();
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
(void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE);