aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-05-14 12:26:03 +0200
committerJurica Bradaric <jbradaric@gmail.com>2016-05-14 12:39:41 +0200
commit1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267 (patch)
tree4150bf9457d6ef1b35e6238afc6c1ed6c671b37f /src
parentd02cfe80618bb85cc1cc4a19a9cfc69ae64b98af (diff)
downloadrneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.tar.gz
rneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.tar.bz2
rneovim-1573aa0b0a0a17da93e4fb2220fd5d6ecbd6d267.zip
vim-patch:7.4.1119
Problem: argidx() has a wrong value after ":%argdelete". (Yegappan Lakshmanan) Solution: Correct the value of w_arg_idx. Add a test. https://github.com/vim/vim/commit/72defda84eb26be9e2ade56c7877b912f818026e
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds2.c10
-rw-r--r--src/nvim/version.c2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 12efddc205..18e09a7619 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -1861,11 +1861,17 @@ void ex_argdelete(exarg_T *eap)
} else if (curwin->w_arg_idx > eap->line1) {
curwin->w_arg_idx = (int)eap->line1;
}
+ if (ARGCOUNT == 0) {
+ curwin->w_arg_idx = 0;
+ } else if (curwin->w_arg_idx >= ARGCOUNT) {
+ curwin->w_arg_idx = ARGCOUNT - 1;
+ }
}
- } else if (*eap->arg == NUL)
+ } else if (*eap->arg == NUL) {
EMSG(_(e_argreq));
- else
+ } else {
do_arglist(eap->arg, AL_DEL, 0);
+ }
maketitle();
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index b55d31ea76..937d481e19 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -563,7 +563,7 @@ static int included_patches[] = {
// 1122 NA
// 1121,
1120,
- // 1119,
+ 1119,
1118,
1117,
1116,