Mercurial > vim
comparison src/ex_cmds2.c @ 7639:0ecb62a66a7a v7.4.1119
commit https://github.com/vim/vim/commit/72defda84eb26be9e2ade56c7877b912f818026e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 17 18:04:33 2016 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Jan 2016 18:15:04 +0100 |
parents | b4384c581806 |
children | 65b2d593c203 |
comparison
equal
deleted
inserted
replaced
7638:67ff092db9d6 | 7639:0ecb62a66a7a |
---|---|
2560 ALIST(curwin)->al_ga.ga_len -= n; | 2560 ALIST(curwin)->al_ga.ga_len -= n; |
2561 if (curwin->w_arg_idx >= eap->line2) | 2561 if (curwin->w_arg_idx >= eap->line2) |
2562 curwin->w_arg_idx -= n; | 2562 curwin->w_arg_idx -= n; |
2563 else if (curwin->w_arg_idx > eap->line1) | 2563 else if (curwin->w_arg_idx > eap->line1) |
2564 curwin->w_arg_idx = eap->line1; | 2564 curwin->w_arg_idx = eap->line1; |
2565 if (ARGCOUNT == 0) | |
2566 curwin->w_arg_idx = 0; | |
2567 else if (curwin->w_arg_idx >= ARGCOUNT) | |
2568 curwin->w_arg_idx = ARGCOUNT - 1; | |
2565 } | 2569 } |
2566 } | 2570 } |
2567 else if (*eap->arg == NUL) | 2571 else if (*eap->arg == NUL) |
2568 EMSG(_(e_argreq)); | 2572 EMSG(_(e_argreq)); |
2569 else | 2573 else |