'inccommand': buftype=nofile, restore cursor/view

- Use a standard scratch buffer instead of a new 'buftype', functions
  like curbufIsChanged() already have special handling for scratch bufs.
- Cleanup some stuff from the previous merge.
- Add support for :smagic, :snomagic. Closes #5578
This commit is contained in:
Justin M. Keyes
2016-11-09 12:08:49 +01:00
parent 0213e99aaf
commit 2e1217da46
9 changed files with 73 additions and 42 deletions

View File

@@ -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;