'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

@@ -7295,15 +7295,13 @@ void ex_may_print(exarg_T *eap)
}
}
/*
* ":smagic" and ":snomagic".
*/
/// ":smagic" and ":snomagic".
static void ex_submagic(exarg_T *eap)
{
int magic_save = p_magic;
p_magic = (eap->cmdidx == CMD_smagic);
do_sub(eap);
ex_substitute(eap);
p_magic = magic_save;
}
@@ -9669,5 +9667,7 @@ bool cmd_is_live(char_u *cmd)
}
find_command(&ea, NULL);
return (ea.cmdidx == CMD_substitute);
return ea.cmdidx == CMD_substitute
|| ea.cmdidx == CMD_smagic
|| ea.cmdidx == CMD_snomagic;
}