|
Karsten Hopp |
7080e3 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
7080e3 |
Subject: Patch 7.4.565
|
|
Karsten Hopp |
7080e3 |
Fcc: outbox
|
|
Karsten Hopp |
7080e3 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
7080e3 |
Mime-Version: 1.0
|
|
Karsten Hopp |
7080e3 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
7080e3 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
7080e3 |
------------
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
Patch 7.4.565
|
|
Karsten Hopp |
7080e3 |
Problem: Ranges for arguments, buffers, tabs, etc. are not checked to be
|
|
Karsten Hopp |
7080e3 |
valid but limited to the maximum. This can cause the wrong thing
|
|
Karsten Hopp |
7080e3 |
to happen.
|
|
Karsten Hopp |
7080e3 |
Solution: Give an error for an invalid value. (Marcin Szamotulski)
|
|
Karsten Hopp |
7080e3 |
Use windows range for ":wincmd".
|
|
Karsten Hopp |
7080e3 |
Files: src/ex_docmd.c, src/ex_cmds.h, src/testdir/test62.in,
|
|
Karsten Hopp |
7080e3 |
src/testdir/test_argument_count.in,
|
|
Karsten Hopp |
7080e3 |
src/testdir/test_argument_count.ok,
|
|
Karsten Hopp |
7080e3 |
src/testdir/test_close_count.in,
|
|
Karsten Hopp |
7080e3 |
src/testdir/test_command_count.in,
|
|
Karsten Hopp |
7080e3 |
src/testdir/test_command_count.ok
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/ex_docmd.c 2015-01-07 13:15:40.605829542 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/ex_docmd.c 2015-01-07 15:33:21.950217606 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 2161,2166 ****
|
|
Karsten Hopp |
7080e3 |
--- 2161,2168 ----
|
|
Karsten Hopp |
7080e3 |
break;
|
|
Karsten Hopp |
7080e3 |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
7080e3 |
ea.line2 = curwin->w_arg_idx + 1;
|
|
Karsten Hopp |
7080e3 |
+ if (ea.line2 > ARGCOUNT)
|
|
Karsten Hopp |
7080e3 |
+ ea.line2 = ARGCOUNT;
|
|
Karsten Hopp |
7080e3 |
break;
|
|
Karsten Hopp |
7080e3 |
case ADDR_LOADED_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
case ADDR_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 3110,3116 ****
|
|
Karsten Hopp |
7080e3 |
* Exceptions:
|
|
Karsten Hopp |
7080e3 |
* - the 'k' command can directly be followed by any character.
|
|
Karsten Hopp |
7080e3 |
* - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
|
|
Karsten Hopp |
7080e3 |
! * but :sre[wind] is another command, as are :scrip[tnames],
|
|
Karsten Hopp |
7080e3 |
* :scs[cope], :sim[alt], :sig[ns] and :sil[ent].
|
|
Karsten Hopp |
7080e3 |
* - the "d" command can directly be followed by 'l' or 'p' flag.
|
|
Karsten Hopp |
7080e3 |
*/
|
|
Karsten Hopp |
7080e3 |
--- 3112,3118 ----
|
|
Karsten Hopp |
7080e3 |
* Exceptions:
|
|
Karsten Hopp |
7080e3 |
* - the 'k' command can directly be followed by any character.
|
|
Karsten Hopp |
7080e3 |
* - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
|
|
Karsten Hopp |
7080e3 |
! * but :sre[wind] is another command, as are :scr[iptnames],
|
|
Karsten Hopp |
7080e3 |
* :scs[cope], :sim[alt], :sig[ns] and :sil[ent].
|
|
Karsten Hopp |
7080e3 |
* - the "d" command can directly be followed by 'l' or 'p' flag.
|
|
Karsten Hopp |
7080e3 |
*/
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 4573,4618 ****
|
|
Karsten Hopp |
7080e3 |
lnum -= n;
|
|
Karsten Hopp |
7080e3 |
else
|
|
Karsten Hopp |
7080e3 |
lnum += n;
|
|
Karsten Hopp |
7080e3 |
-
|
|
Karsten Hopp |
7080e3 |
- switch (addr_type)
|
|
Karsten Hopp |
7080e3 |
- {
|
|
Karsten Hopp |
7080e3 |
- case ADDR_LINES:
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
7080e3 |
- if (lnum < 0)
|
|
Karsten Hopp |
7080e3 |
- lnum = 0;
|
|
Karsten Hopp |
7080e3 |
- else if (lnum >= ARGCOUNT)
|
|
Karsten Hopp |
7080e3 |
- lnum = ARGCOUNT;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- case ADDR_TABS:
|
|
Karsten Hopp |
7080e3 |
- if (lnum < 0)
|
|
Karsten Hopp |
7080e3 |
- {
|
|
Karsten Hopp |
7080e3 |
- lnum = 0;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- }
|
|
Karsten Hopp |
7080e3 |
- if (lnum >= LAST_TAB_NR)
|
|
Karsten Hopp |
7080e3 |
- lnum = LAST_TAB_NR;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- case ADDR_WINDOWS:
|
|
Karsten Hopp |
7080e3 |
- if (lnum < 0)
|
|
Karsten Hopp |
7080e3 |
- {
|
|
Karsten Hopp |
7080e3 |
- lnum = 0;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- }
|
|
Karsten Hopp |
7080e3 |
- if (lnum >= LAST_WIN_NR)
|
|
Karsten Hopp |
7080e3 |
- lnum = LAST_WIN_NR;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- case ADDR_LOADED_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
- case ADDR_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
- if (lnum < firstbuf->b_fnum)
|
|
Karsten Hopp |
7080e3 |
- {
|
|
Karsten Hopp |
7080e3 |
- lnum = firstbuf->b_fnum;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- }
|
|
Karsten Hopp |
7080e3 |
- if (lnum > lastbuf->b_fnum)
|
|
Karsten Hopp |
7080e3 |
- lnum = lastbuf->b_fnum;
|
|
Karsten Hopp |
7080e3 |
- break;
|
|
Karsten Hopp |
7080e3 |
- }
|
|
Karsten Hopp |
7080e3 |
}
|
|
Karsten Hopp |
7080e3 |
} while (*cmd == '/' || *cmd == '?');
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
--- 4575,4580 ----
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 4675,4691 ****
|
|
Karsten Hopp |
7080e3 |
invalid_range(eap)
|
|
Karsten Hopp |
7080e3 |
exarg_T *eap;
|
|
Karsten Hopp |
7080e3 |
{
|
|
Karsten Hopp |
7080e3 |
if ( eap->line1 < 0
|
|
Karsten Hopp |
7080e3 |
|| eap->line2 < 0
|
|
Karsten Hopp |
7080e3 |
! || eap->line1 > eap->line2
|
|
Karsten Hopp |
7080e3 |
! || ((eap->argt & RANGE)
|
|
Karsten Hopp |
7080e3 |
! && !(eap->argt & NOTADR)
|
|
Karsten Hopp |
7080e3 |
! && eap->line2 > curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
7080e3 |
#ifdef FEAT_DIFF
|
|
Karsten Hopp |
7080e3 |
! + (eap->cmdidx == CMD_diffget)
|
|
Karsten Hopp |
7080e3 |
#endif
|
|
Karsten Hopp |
7080e3 |
! ))
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
return NULL;
|
|
Karsten Hopp |
7080e3 |
}
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
--- 4637,4701 ----
|
|
Karsten Hopp |
7080e3 |
invalid_range(eap)
|
|
Karsten Hopp |
7080e3 |
exarg_T *eap;
|
|
Karsten Hopp |
7080e3 |
{
|
|
Karsten Hopp |
7080e3 |
+ buf_T *buf;
|
|
Karsten Hopp |
7080e3 |
if ( eap->line1 < 0
|
|
Karsten Hopp |
7080e3 |
|| eap->line2 < 0
|
|
Karsten Hopp |
7080e3 |
! || eap->line1 > eap->line2)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
!
|
|
Karsten Hopp |
7080e3 |
! if (eap->argt & RANGE)
|
|
Karsten Hopp |
7080e3 |
! {
|
|
Karsten Hopp |
7080e3 |
! switch(eap->addr_type)
|
|
Karsten Hopp |
7080e3 |
! {
|
|
Karsten Hopp |
7080e3 |
! case ADDR_LINES:
|
|
Karsten Hopp |
7080e3 |
! if (!(eap->argt & NOTADR)
|
|
Karsten Hopp |
7080e3 |
! && eap->line2 > curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
7080e3 |
#ifdef FEAT_DIFF
|
|
Karsten Hopp |
7080e3 |
! + (eap->cmdidx == CMD_diffget)
|
|
Karsten Hopp |
7080e3 |
#endif
|
|
Karsten Hopp |
7080e3 |
! )
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
7080e3 |
! if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) // add 1 if ARCOUNT is 0
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! case ADDR_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
! if (eap->line1 < firstbuf->b_fnum
|
|
Karsten Hopp |
7080e3 |
! || eap->line2 > lastbuf->b_fnum)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! case ADDR_LOADED_BUFFERS:
|
|
Karsten Hopp |
7080e3 |
! buf = firstbuf;
|
|
Karsten Hopp |
7080e3 |
! while (buf->b_ml.ml_mfp == NULL)
|
|
Karsten Hopp |
7080e3 |
! {
|
|
Karsten Hopp |
7080e3 |
! if (buf->b_next == NULL)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! buf = buf->b_next;
|
|
Karsten Hopp |
7080e3 |
! }
|
|
Karsten Hopp |
7080e3 |
! if (eap->line1 < buf->b_fnum)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! buf = lastbuf;
|
|
Karsten Hopp |
7080e3 |
! while (buf->b_ml.ml_mfp == NULL)
|
|
Karsten Hopp |
7080e3 |
! {
|
|
Karsten Hopp |
7080e3 |
! if (buf->b_prev == NULL)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! buf = buf->b_prev;
|
|
Karsten Hopp |
7080e3 |
! }
|
|
Karsten Hopp |
7080e3 |
! if (eap->line2 > buf->b_fnum)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! case ADDR_WINDOWS:
|
|
Karsten Hopp |
7080e3 |
! if (eap->line1 < 1
|
|
Karsten Hopp |
7080e3 |
! || eap->line2 > LAST_WIN_NR)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! case ADDR_TABS:
|
|
Karsten Hopp |
7080e3 |
! if (eap->line2 > LAST_TAB_NR)
|
|
Karsten Hopp |
7080e3 |
! return (char_u *)_(e_invrange);
|
|
Karsten Hopp |
7080e3 |
! break;
|
|
Karsten Hopp |
7080e3 |
! }
|
|
Karsten Hopp |
7080e3 |
! }
|
|
Karsten Hopp |
7080e3 |
return NULL;
|
|
Karsten Hopp |
7080e3 |
}
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/ex_cmds.h 2014-12-17 14:36:10.363090985 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/ex_cmds.h 2015-01-07 15:47:15.336518550 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 1574,1580 ****
|
|
Karsten Hopp |
7080e3 |
ADDR_LINES),
|
|
Karsten Hopp |
7080e3 |
EX(CMD_wincmd, "wincmd", ex_wincmd,
|
|
Karsten Hopp |
7080e3 |
NEEDARG|WORD1|RANGE|NOTADR,
|
|
Karsten Hopp |
7080e3 |
! ADDR_LINES),
|
|
Karsten Hopp |
7080e3 |
EX(CMD_windo, "windo", ex_listdo,
|
|
Karsten Hopp |
7080e3 |
BANG|NEEDARG|EXTRA|NOTRLCOM,
|
|
Karsten Hopp |
7080e3 |
ADDR_LINES),
|
|
Karsten Hopp |
7080e3 |
--- 1574,1580 ----
|
|
Karsten Hopp |
7080e3 |
ADDR_LINES),
|
|
Karsten Hopp |
7080e3 |
EX(CMD_wincmd, "wincmd", ex_wincmd,
|
|
Karsten Hopp |
7080e3 |
NEEDARG|WORD1|RANGE|NOTADR,
|
|
Karsten Hopp |
7080e3 |
! ADDR_WINDOWS),
|
|
Karsten Hopp |
7080e3 |
EX(CMD_windo, "windo", ex_listdo,
|
|
Karsten Hopp |
7080e3 |
BANG|NEEDARG|EXTRA|NOTRLCOM,
|
|
Karsten Hopp |
7080e3 |
ADDR_LINES),
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test62.in 2014-04-29 11:55:26.172053624 +0200
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test62.in 2015-01-07 15:33:21.950217606 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 13,19 ****
|
|
Karsten Hopp |
7080e3 |
:" Open three tab pages and use ":tabdo"
|
|
Karsten Hopp |
7080e3 |
:0tabnew
|
|
Karsten Hopp |
7080e3 |
:1tabnew
|
|
Karsten Hopp |
7080e3 |
! :888tabnew
|
|
Karsten Hopp |
7080e3 |
:tabdo call append(line('$'), 'this is tab page ' . tabpagenr())
|
|
Karsten Hopp |
7080e3 |
:tabclose! 2
|
|
Karsten Hopp |
7080e3 |
:tabrewind
|
|
Karsten Hopp |
7080e3 |
--- 13,19 ----
|
|
Karsten Hopp |
7080e3 |
:" Open three tab pages and use ":tabdo"
|
|
Karsten Hopp |
7080e3 |
:0tabnew
|
|
Karsten Hopp |
7080e3 |
:1tabnew
|
|
Karsten Hopp |
7080e3 |
! :$tabnew
|
|
Karsten Hopp |
7080e3 |
:tabdo call append(line('$'), 'this is tab page ' . tabpagenr())
|
|
Karsten Hopp |
7080e3 |
:tabclose! 2
|
|
Karsten Hopp |
7080e3 |
:tabrewind
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test_argument_count.in 2014-11-27 18:32:58.532564506 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test_argument_count.in 2015-01-07 15:33:21.950217606 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 27,36 ****
|
|
Karsten Hopp |
7080e3 |
:1arga c
|
|
Karsten Hopp |
7080e3 |
:1arga b
|
|
Karsten Hopp |
7080e3 |
:$argu
|
|
Karsten Hopp |
7080e3 |
- :+arga d
|
|
Karsten Hopp |
7080e3 |
:$arga x
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
! :$-10arga Y
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
:%argd
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
--- 27,35 ----
|
|
Karsten Hopp |
7080e3 |
:1arga c
|
|
Karsten Hopp |
7080e3 |
:1arga b
|
|
Karsten Hopp |
7080e3 |
:$argu
|
|
Karsten Hopp |
7080e3 |
:$arga x
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
! :0arga Y
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
:%argd
|
|
Karsten Hopp |
7080e3 |
:call add(arglists, argv())
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test_argument_count.ok 2014-11-27 16:22:42.746412995 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test_argument_count.ok 2015-01-07 15:33:21.950217606 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 7,13 ****
|
|
Karsten Hopp |
7080e3 |
a b d
|
|
Karsten Hopp |
7080e3 |
a d
|
|
Karsten Hopp |
7080e3 |
a
|
|
Karsten Hopp |
7080e3 |
! a b c d x
|
|
Karsten Hopp |
7080e3 |
! Y a b c d x
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
a f
|
|
Karsten Hopp |
7080e3 |
--- 7,13 ----
|
|
Karsten Hopp |
7080e3 |
a b d
|
|
Karsten Hopp |
7080e3 |
a d
|
|
Karsten Hopp |
7080e3 |
a
|
|
Karsten Hopp |
7080e3 |
! a b c x
|
|
Karsten Hopp |
7080e3 |
! Y a b c x
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
a f
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test_close_count.in 2014-12-17 14:42:42.990240206 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test_close_count.in 2015-01-07 15:33:21.950217606 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 28,34 ****
|
|
Karsten Hopp |
7080e3 |
:new
|
|
Karsten Hopp |
7080e3 |
:new
|
|
Karsten Hopp |
7080e3 |
:2wincmd w
|
|
Karsten Hopp |
7080e3 |
! :-2close!
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
--- 28,34 ----
|
|
Karsten Hopp |
7080e3 |
:new
|
|
Karsten Hopp |
7080e3 |
:new
|
|
Karsten Hopp |
7080e3 |
:2wincmd w
|
|
Karsten Hopp |
7080e3 |
! :-1close!
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 61,67 ****
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
! :9hide
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
--- 61,67 ----
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
! :$hide
|
|
Karsten Hopp |
7080e3 |
:let buffers = []
|
|
Karsten Hopp |
7080e3 |
:windo call add(buffers, bufnr('%'))
|
|
Karsten Hopp |
7080e3 |
:call add(tests, buffers)
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test_command_count.in 2015-01-07 13:15:40.609829496 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test_command_count.in 2015-01-07 15:49:24.343016552 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 1,8 ****
|
|
Karsten Hopp |
7080e3 |
Test for user command counts vim: set ft=vim :
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
STARTTEST
|
|
Karsten Hopp |
7080e3 |
- :let g:lines = []
|
|
Karsten Hopp |
7080e3 |
:so tiny.vim
|
|
Karsten Hopp |
7080e3 |
:com -range=% RangeLines :call add(g:lines, 'RangeLines '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
:com -range -addr=arguments RangeArguments :call add(g:lines, 'RangeArguments '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
:com -range=% -addr=arguments RangeArgumentsAll :call add(g:lines, 'RangeArgumentsAll '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
--- 1,8 ----
|
|
Karsten Hopp |
7080e3 |
Test for user command counts vim: set ft=vim :
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
STARTTEST
|
|
Karsten Hopp |
7080e3 |
:so tiny.vim
|
|
Karsten Hopp |
7080e3 |
+ :let g:lines = []
|
|
Karsten Hopp |
7080e3 |
:com -range=% RangeLines :call add(g:lines, 'RangeLines '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
:com -range -addr=arguments RangeArguments :call add(g:lines, 'RangeArguments '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
:com -range=% -addr=arguments RangeArgumentsAll :call add(g:lines, 'RangeArgumentsAll '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 48,53 ****
|
|
Karsten Hopp |
7080e3 |
--- 48,93 ----
|
|
Karsten Hopp |
7080e3 |
:'<,'>RangeLines
|
|
Karsten Hopp |
7080e3 |
:com -range=% -buffer LocalRangeLines :call add(g:lines, 'LocalRangeLines '.<line1>.' '.<line2>)
|
|
Karsten Hopp |
7080e3 |
:'<,'>LocalRangeLines
|
|
Karsten Hopp |
7080e3 |
+ :b1
|
|
Karsten Hopp |
7080e3 |
+ ENDTEST
|
|
Karsten Hopp |
7080e3 |
+
|
|
Karsten Hopp |
7080e3 |
+ STARTTEST
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '')
|
|
Karsten Hopp |
7080e3 |
+ :%argd
|
|
Karsten Hopp |
7080e3 |
+ :arga a b c d
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :5argu
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '5argu ' . v:errmsg)
|
|
Karsten Hopp |
7080e3 |
+ :$argu
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '4argu ' . expand('%:t'))
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :1argu
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '1argu ' . expand('%:t'))
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :100b
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '100b ' . v:errmsg)
|
|
Karsten Hopp |
7080e3 |
+ :split|split|split|split
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :0close
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '0close ' . v:errmsg)
|
|
Karsten Hopp |
7080e3 |
+ :$wincmd w
|
|
Karsten Hopp |
7080e3 |
+ :$close
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '$close ' . winnr())
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :$+close
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '$+close ' . v:errmsg)
|
|
Karsten Hopp |
7080e3 |
+ :$tabe
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '$tabe ' . tabpagenr())
|
|
Karsten Hopp |
7080e3 |
+ :let v:errmsg = ''
|
|
Karsten Hopp |
7080e3 |
+ :$+tabe
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '$+tabe ' . v:errmsg)
|
|
Karsten Hopp |
7080e3 |
+ :only!
|
|
Karsten Hopp |
7080e3 |
+ :e x
|
|
Karsten Hopp |
7080e3 |
+ :0tabm
|
|
Karsten Hopp |
7080e3 |
+ :normal 1gt
|
|
Karsten Hopp |
7080e3 |
+ :call add(g:lines, '0tabm ' . expand('%:t'))
|
|
Karsten Hopp |
7080e3 |
+ :tabonly!
|
|
Karsten Hopp |
7080e3 |
+ :only!
|
|
Karsten Hopp |
7080e3 |
:e! test.out
|
|
Karsten Hopp |
7080e3 |
:call append(0, g:lines)
|
|
Karsten Hopp |
7080e3 |
:w|qa!
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/testdir/test_command_count.ok 2015-01-07 13:15:40.609829496 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/testdir/test_command_count.ok 2015-01-07 15:49:19.223076159 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 17,19 ****
|
|
Karsten Hopp |
7080e3 |
--- 17,30 ----
|
|
Karsten Hopp |
7080e3 |
RangeLines 2 5
|
|
Karsten Hopp |
7080e3 |
LocalRangeLines 2 5
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
+ 5argu E16: Invalid range
|
|
Karsten Hopp |
7080e3 |
+ 4argu d
|
|
Karsten Hopp |
7080e3 |
+ 1argu a
|
|
Karsten Hopp |
7080e3 |
+ 100b E16: Invalid range
|
|
Karsten Hopp |
7080e3 |
+ 0close E16: Invalid range
|
|
Karsten Hopp |
7080e3 |
+ $close 4
|
|
Karsten Hopp |
7080e3 |
+ $+close E16: Invalid range
|
|
Karsten Hopp |
7080e3 |
+ $tabe 2
|
|
Karsten Hopp |
7080e3 |
+ $+tabe E16: Invalid range
|
|
Karsten Hopp |
7080e3 |
+ 0tabm x
|
|
Karsten Hopp |
7080e3 |
+
|
|
Karsten Hopp |
7080e3 |
*** ../vim-7.4.564/src/version.c 2015-01-07 14:43:35.728900384 +0100
|
|
Karsten Hopp |
7080e3 |
--- src/version.c 2015-01-07 15:32:05.899101868 +0100
|
|
Karsten Hopp |
7080e3 |
***************
|
|
Karsten Hopp |
7080e3 |
*** 743,744 ****
|
|
Karsten Hopp |
7080e3 |
--- 743,746 ----
|
|
Karsten Hopp |
7080e3 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
7080e3 |
+ /**/
|
|
Karsten Hopp |
7080e3 |
+ 565,
|
|
Karsten Hopp |
7080e3 |
/**/
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
--
|
|
Karsten Hopp |
7080e3 |
"I simultaneously try to keep my head in the clouds and my feet on the
|
|
Karsten Hopp |
7080e3 |
ground. Sometimes it's a stretch, though." -- Larry Wall
|
|
Karsten Hopp |
7080e3 |
|
|
Karsten Hopp |
7080e3 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
7080e3 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
7080e3 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
7080e3 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|