aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 5bd79719e7..18206cb3c1 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -888,6 +888,17 @@ void ex_drop(exarg_T *eap)
if (curbuf->b_ml.ml_flags & ML_EMPTY) {
ex_rewind(eap);
}
+
+ // execute [+cmd]
+ if (eap->do_ecmd_cmd) {
+ bool did_set_swapcommand = set_swapcommand(eap->do_ecmd_cmd, 0);
+ do_cmdline(eap->do_ecmd_cmd, NULL, NULL, DOCMD_VERBOSE);
+ if (did_set_swapcommand) {
+ set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
+ }
+ }
+
+ // no need to execute [++opts] - they only apply for newly loaded buffers.
return;
}
}