aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2014-12-23 11:51:13 +0100
committerFlorian Walch <florian@fwalch.com>2014-12-23 21:10:40 +0100
commita1c03c33b32a0b7e5c34032a24600897e67437fb (patch)
treec6a4a33d6d2d4f20e3ff0f08f53e606d8d96a643 /src/nvim/ex_docmd.c
parent4f6bb8a9a997aacbe9f9f1ca83e7e4c502bdc03c (diff)
downloadrneovim-a1c03c33b32a0b7e5c34032a24600897e67437fb.tar.gz
rneovim-a1c03c33b32a0b7e5c34032a24600897e67437fb.tar.bz2
rneovim-a1c03c33b32a0b7e5c34032a24600897e67437fb.zip
vim-patch:7.4.450
Problem: Not all commands that edit another buffer support the +cmd argument. Solution: Add the +cmd argument to relevant commands. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?r=v7-4-450
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index f25af3f587..e741022a48 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -3957,13 +3957,17 @@ static void ex_bunload(exarg_T *eap)
*/
static void ex_buffer(exarg_T *eap)
{
- if (*eap->arg)
+ if (*eap->arg) {
eap->errmsg = e_trailing;
- else {
- if (eap->addr_count == 0) /* default is current buffer */
+ } else {
+ if (eap->addr_count == 0) { // default is current buffer
goto_buffer(eap, DOBUF_CURRENT, FORWARD, 0);
- else
+ } else {
goto_buffer(eap, DOBUF_FIRST, FORWARD, (int)eap->line2);
+ }
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
}
@@ -3974,6 +3978,9 @@ static void ex_buffer(exarg_T *eap)
static void ex_bmodified(exarg_T *eap)
{
goto_buffer(eap, DOBUF_MOD, FORWARD, (int)eap->line2);
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
/*
@@ -3983,6 +3990,9 @@ static void ex_bmodified(exarg_T *eap)
static void ex_bnext(exarg_T *eap)
{
goto_buffer(eap, DOBUF_CURRENT, FORWARD, (int)eap->line2);
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
/*
@@ -3994,6 +4004,9 @@ static void ex_bnext(exarg_T *eap)
static void ex_bprevious(exarg_T *eap)
{
goto_buffer(eap, DOBUF_CURRENT, BACKWARD, (int)eap->line2);
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
/*
@@ -4005,6 +4018,9 @@ static void ex_bprevious(exarg_T *eap)
static void ex_brewind(exarg_T *eap)
{
goto_buffer(eap, DOBUF_FIRST, FORWARD, 0);
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
/*
@@ -4014,6 +4030,9 @@ static void ex_brewind(exarg_T *eap)
static void ex_blast(exarg_T *eap)
{
goto_buffer(eap, DOBUF_LAST, BACKWARD, 0);
+ if (eap->do_ecmd_cmd != NULL) {
+ do_cmdline_cmd(eap->do_ecmd_cmd);
+ }
}
int ends_excmd(int c) FUNC_ATTR_CONST