aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-11-09 12:08:49 +0100
committerJustin M. Keyes <justinkz@gmail.com>2016-11-10 15:48:00 +0100
commit2e1217da4617c832afcd7ca90c88b06c200dc23b (patch)
tree89b918a89238899aa97e8d06314b377909812293 /src/nvim/ex_docmd.c
parent0213e99aaf6eba303fd459183dd14a4a11cc5b07 (diff)
downloadrneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.tar.gz
rneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.tar.bz2
rneovim-2e1217da4617c832afcd7ca90c88b06c200dc23b.zip
'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
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 30347cbe85..07e0fa8844 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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;
}