diff options
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 17693ecfc8..8ddb1047c7 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -5147,7 +5147,9 @@ static int ex_window(void) cmdwin_type = get_cmdline_type(); // Create empty command-line buffer. - buf_open_special(0, "[Command Line]", "nofile"); + buf_open_scratch(0, "[Command Line]"); + // Command-line buffer has bufhidden=wipe, unlike a true "scratch" buffer. + set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL); curwin->w_p_rl = cmdmsg_rl; cmdmsg_rl = false; curbuf->b_p_ma = true; |