073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.566
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.566
073263
Problem:    :argdo, :bufdo, :windo and :tabdo don't take a range.
073263
Solution:   Support the range. (Marcin Szamotulski)
073263
Files:	    runtime/doc/editing.txt, runtime/doc/tabpage.txt,
073263
	    runtime/doc/windows.txt, src/ex_cmds.h, src/ex_cmds2.c,
073263
	    src/testdir/test_command_count.in,
073263
	    src/testdir/test_command_count.ok
073263
073263
073263
*** ../vim-7.4.565/runtime/doc/editing.txt	2014-11-27 16:22:42.734413130 +0100
073263
--- runtime/doc/editing.txt	2015-01-07 16:09:20.501100753 +0100
073263
***************
073263
*** 38,43 ****
073263
--- 38,44 ----
073263
  file name.  It can be used with "#" on the command line |:_#| and you can use
073263
  the |CTRL-^| command to toggle between the current and the alternate file.
073263
  However, the alternate file name is not changed when |:keepalt| is used.
073263
+ An alternate file name is remembered for each window.
073263
  
073263
  							*:keepalt* *:keepa*
073263
  :keepalt {cmd}		Execute {cmd} while keeping the current alternate file
073263
***************
073263
*** 610,616 ****
073263
  :[count]arga[dd] {name} ..			*:arga* *:argadd* *E479*
073263
  :[count]arga[dd]
073263
  			Add the {name}s to the argument list.  When {name} is
073263
! 			omitted at the current buffer name to the argument
073263
  			list.
073263
  			If [count] is omitted, the {name}s are added just
073263
  			after the current entry in the argument list.
073263
--- 611,617 ----
073263
  :[count]arga[dd] {name} ..			*:arga* *:argadd* *E479*
073263
  :[count]arga[dd]
073263
  			Add the {name}s to the argument list.  When {name} is
073263
! 			omitted add the current buffer name to the argument
073263
  			list.
073263
  			If [count] is omitted, the {name}s are added just
073263
  			after the current entry in the argument list.
073263
***************
073263
*** 831,838 ****
073263
  USING THE ARGUMENT LIST
073263
  
073263
  						*:argdo*
073263
! :argdo[!] {cmd}		Execute {cmd} for each file in the argument list.
073263
! 			It works like doing this: >
073263
  				:rewind
073263
  				:{cmd}
073263
  				:next
073263
--- 832,840 ----
073263
  USING THE ARGUMENT LIST
073263
  
073263
  						*:argdo*
073263
! :[range]argdo[!] {cmd}	Execute {cmd} for each file in the argument list or
073263
! 			if [range] is specified only for arguments in that
073263
! 			range.  It works like doing this: >
073263
  				:rewind
073263
  				:{cmd}
073263
  				:next
073263
***************
073263
*** 1090,1096 ****
073263
  
073263
  :q[uit]!		Quit without writing, also when currently visible
073263
  			buffers have changes.  Does not exit when this is the
073263
! 			last window and there are is a changed hidden buffer.
073263
  			In this case, the first changed hidden buffer becomes
073263
  			the current buffer.
073263
  			Use ":qall!" to exit always.
073263
--- 1092,1098 ----
073263
  
073263
  :q[uit]!		Quit without writing, also when currently visible
073263
  			buffers have changes.  Does not exit when this is the
073263
! 			last window and there is a changed hidden buffer.
073263
  			In this case, the first changed hidden buffer becomes
073263
  			the current buffer.
073263
  			Use ":qall!" to exit always.
073263
***************
073263
*** 1390,1396 ****
073263
  You could do this to edit very secret text: >
073263
  	:set noundofile viminfo=
073263
  	:noswapfile edit secrets.txt
073263
! Keep in mind that without a swap file you risk loosing your work in a crash.
073263
  
073263
  WARNING: If you make a typo when entering the key and then write the file and
073263
  exit, the text will be lost!
073263
--- 1392,1398 ----
073263
  You could do this to edit very secret text: >
073263
  	:set noundofile viminfo=
073263
  	:noswapfile edit secrets.txt
073263
! Keep in mind that without a swap file you risk losing your work in a crash.
073263
  
073263
  WARNING: If you make a typo when entering the key and then write the file and
073263
  exit, the text will be lost!
073263
***************
073263
*** 1426,1438 ****
073263
  set automatically to the method used when that file was written.  You can
073263
  change 'cryptmethod' before writing that file to change the method.
073263
  
073263
! To set the default method, used for new files, use one of these in your
073263
! |vimrc| file: >
073263
! 	set cm=zip
073263
  	set cm=blowfish2
073263
! Use the first one if you need to be compatible with Vim 7.2 and older.  Using
073263
! "blowfish2" is highly recommended if you can use a Vim version that supports
073263
! it.
073263
  
073263
  The message given for reading and writing a file will show "[crypted]" when
073263
  using zip, "[blowfish]" when using blowfish, etc.
073263
--- 1428,1438 ----
073263
  set automatically to the method used when that file was written.  You can
073263
  change 'cryptmethod' before writing that file to change the method.
073263
  
073263
! To set the default method, used for new files, use this in your |vimrc| 
073263
! file: >
073263
  	set cm=blowfish2
073263
! Using "blowfish2" is highly recommended.  Only use another method if you
073263
! must use an older Vim version that does not support it.
073263
  
073263
  The message given for reading and writing a file will show "[crypted]" when
073263
  using zip, "[blowfish]" when using blowfish, etc.
073263
***************
073263
*** 1494,1501 ****
073263
  - Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
073263
    objection to its export.  Pkzip's public file APPNOTE.TXT describes this
073263
    algorithm in detail.
073263
! - The implmentation of 'cryptmethod' "blowfish" has a flaw.  It is possible to
073263
!   crack the first 64 bytes of a file and in some circumstances more of the
073263
    file. Use of it is not recommended, but it's still the strongest method
073263
    supported by Vim 7.3 and 7.4.  The "zip" method is even weaker.
073263
  - Vim originates from the Netherlands.  That is where the sources come from.
073263
--- 1494,1501 ----
073263
  - Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
073263
    objection to its export.  Pkzip's public file APPNOTE.TXT describes this
073263
    algorithm in detail.
073263
! - The implementation of 'cryptmethod' "blowfish" has a flaw.  It is possible
073263
!   to crack the first 64 bytes of a file and in some circumstances more of the
073263
    file. Use of it is not recommended, but it's still the strongest method
073263
    supported by Vim 7.3 and 7.4.  The "zip" method is even weaker.
073263
  - Vim originates from the Netherlands.  That is where the sources come from.
073263
*** ../vim-7.4.565/runtime/doc/tabpage.txt	2014-11-27 16:22:42.738413084 +0100
073263
--- runtime/doc/tabpage.txt	2015-01-07 16:09:20.501100753 +0100
073263
***************
073263
*** 206,212 ****
073263
  		    :tabmove	" move the tab page to the right
073263
  		    :.tabmove	" as above
073263
  		    :+tabmove	" as above
073263
! 		    :0tabmove	" move the tab page to the begining of the tab
073263
  				" list
073263
  		    :$tabmove	" move the tab page to the end of the tab list
073263
  <
073263
--- 206,212 ----
073263
  		    :tabmove	" move the tab page to the right
073263
  		    :.tabmove	" as above
073263
  		    :+tabmove	" as above
073263
! 		    :0tabmove	" move the tab page to the beginning of the tab
073263
  				" list
073263
  		    :$tabmove	" move the tab page to the end of the tab list
073263
  <
073263
***************
073263
*** 224,231 ****
073263
  LOOPING OVER TAB PAGES:
073263
  
073263
  							*:tabd* *:tabdo*
073263
! :tabd[o] {cmd}	Execute {cmd} in each tab page.
073263
! 		It works like doing this: >
073263
  			:tabfirst
073263
  			:{cmd}
073263
  			:tabnext
073263
--- 224,233 ----
073263
  LOOPING OVER TAB PAGES:
073263
  
073263
  							*:tabd* *:tabdo*
073263
! :[range]tabd[o] {cmd}
073263
! 		Execute {cmd} in each tab page or if [range] is given only in
073263
! 		tab pages which tab page number is in the [range].  It works
073263
! 		like doing this: >
073263
  			:tabfirst
073263
  			:{cmd}
073263
  			:tabnext
073263
***************
073263
*** 271,278 ****
073263
  triggers:
073263
  	WinLeave		leave current window
073263
  	TabLeave		leave current tab page
073263
- 	TabEnter		enter new tab page
073263
  	WinEnter		enter window in new tab page
073263
  	BufLeave		leave current buffer
073263
  	BufEnter		enter new empty buffer
073263
  
073263
--- 273,280 ----
073263
  triggers:
073263
  	WinLeave		leave current window
073263
  	TabLeave		leave current tab page
073263
  	WinEnter		enter window in new tab page
073263
+ 	TabEnter		enter new tab page
073263
  	BufLeave		leave current buffer
073263
  	BufEnter		enter new empty buffer
073263
  
073263
*** ../vim-7.4.565/runtime/doc/windows.txt	2014-11-30 14:50:12.255356230 +0100
073263
--- runtime/doc/windows.txt	2015-01-07 16:09:20.501100753 +0100
073263
***************
073263
*** 278,293 ****
073263
  		and there is only one window for the current buffer, and the
073263
  		buffer was changed, the command fails.
073263
  		
073263
! 		(Note: CTRL-Q does not
073263
! 		work on all terminals).  If [count] is greater than
073263
! 		the last window number the last window will be closed: >
073263
  		    :1quit  " quit the first window
073263
  		    :$quit  " quit the last window
073263
  		    :9quit  " quit the last window
073263
  			     " if there are less than 9 windows opened
073263
  		    :-quit  " quit the previews window
073263
  		    :+quit  " quit the next window
073263
! 		    :+2quit " will also work as expected
073263
  <
073263
  :q[uit]!
073263
  :{count}q[uit]!
073263
--- 278,294 ----
073263
  		and there is only one window for the current buffer, and the
073263
  		buffer was changed, the command fails.
073263
  		
073263
! 		(Note: CTRL-Q does not work on all terminals).
073263
! 		
073263
! 		If [count] is greater than the last window number the last
073263
! 		window will be closed: >
073263
  		    :1quit  " quit the first window
073263
  		    :$quit  " quit the last window
073263
  		    :9quit  " quit the last window
073263
  			     " if there are less than 9 windows opened
073263
  		    :-quit  " quit the previews window
073263
  		    :+quit  " quit the next window
073263
! 		    :+2quit " quit the second next window
073263
  <
073263
  :q[uit]!
073263
  :{count}q[uit]!
073263
***************
073263
*** 332,340 ****
073263
  		screen.  For {count} see |:quit| command.
073263
  		
073263
  		The buffer becomes hidden (unless there is another window
073263
! 		editing it or 'bufhidden' is "unload" or "delete").  If the
073263
! 		window is the last one in the current tab page the tab page is
073263
! 		closed.  |tab-page| 
073263
  		
073263
  		The value of 'hidden' is irrelevant for this command.  Changes
073263
  		to the buffer are not written and won't get lost, so this is a
073263
--- 333,341 ----
073263
  		screen.  For {count} see |:quit| command.
073263
  		
073263
  		The buffer becomes hidden (unless there is another window
073263
! 		editing it or 'bufhidden' is "unload", "delete" or "wipe").
073263
! 		If the window is the last one in the current tab page the tab
073263
! 		page is closed.  |tab-page| 
073263
  		
073263
  		The value of 'hidden' is irrelevant for this command.  Changes
073263
  		to the buffer are not written and won't get lost, so this is a
073263
***************
073263
*** 697,704 ****
073263
  8. Do a command in all buffers or windows			*list-repeat*
073263
  
073263
  							*:windo*
073263
! :windo {cmd}		Execute {cmd} in each window.
073263
! 			It works like doing this: >
073263
  				CTRL-W t
073263
  				:{cmd}
073263
  				CTRL-W w
073263
--- 698,706 ----
073263
  8. Do a command in all buffers or windows			*list-repeat*
073263
  
073263
  							*:windo*
073263
! :[range]windo {cmd}	Execute {cmd} in each window or if [range] is given
073263
! 			only in windows for which the window number lies in
073263
! 			the [range].  It works like doing this: >
073263
  				CTRL-W t
073263
  				:{cmd}
073263
  				CTRL-W w
073263
***************
073263
*** 716,723 ****
073263
  			Also see |:tabdo|, |:argdo| and |:bufdo|.
073263
  
073263
  							*:bufdo*
073263
! :bufdo[!] {cmd}		Execute {cmd} in each buffer in the buffer list.
073263
! 			It works like doing this: >
073263
  				:bfirst
073263
  				:{cmd}
073263
  				:bnext
073263
--- 718,727 ----
073263
  			Also see |:tabdo|, |:argdo| and |:bufdo|.
073263
  
073263
  							*:bufdo*
073263
! :[range]bufdo[!] {cmd}	Execute {cmd} in each buffer in the buffer list or if
073263
! 			[range] is given only for buffers for which their
073263
! 			buffer numer is in the [range].  It works like doing
073263
! 			this: >
073263
  				:bfirst
073263
  				:{cmd}
073263
  				:bnext
073263
***************
073263
*** 763,780 ****
073263
  
073263
  CTRL-W ]					*CTRL-W_]* *CTRL-W_CTRL-]*
073263
  CTRL-W CTRL-]	Split current window in two.  Use identifier under cursor as a
073263
! 		tag and jump to it in the new upper window.  Make new window N
073263
! 		high.
073263
  
073263
  							*CTRL-W_g]*
073263
  CTRL-W g ]	Split current window in two.  Use identifier under cursor as a
073263
  		tag and perform ":tselect" on it in the new upper window.
073263
  		Make new window N high.
073263
  
073263
  							*CTRL-W_g_CTRL-]*
073263
  CTRL-W g CTRL-]	Split current window in two.  Use identifier under cursor as a
073263
! 		tag and perform ":tjump" on it in the new upper window.  Make
073263
! 		new window N high.
073263
  
073263
  CTRL-W f					*CTRL-W_f* *CTRL-W_CTRL-F*
073263
  CTRL-W CTRL-F	Split current window in two.  Edit file name under cursor.
073263
--- 767,787 ----
073263
  
073263
  CTRL-W ]					*CTRL-W_]* *CTRL-W_CTRL-]*
073263
  CTRL-W CTRL-]	Split current window in two.  Use identifier under cursor as a
073263
! 		tag and jump to it in the new upper window.
073263
! 		In Visual mode uses the Visually selected text as a tag.
073263
! 		Make new window N high.
073263
  
073263
  							*CTRL-W_g]*
073263
  CTRL-W g ]	Split current window in two.  Use identifier under cursor as a
073263
  		tag and perform ":tselect" on it in the new upper window.
073263
+ 		In Visual mode uses the Visually selected text as a tag.
073263
  		Make new window N high.
073263
  
073263
  							*CTRL-W_g_CTRL-]*
073263
  CTRL-W g CTRL-]	Split current window in two.  Use identifier under cursor as a
073263
! 		tag and perform ":tjump" on it in the new upper window.
073263
! 		In Visual mode uses the Visually selected text as a tag.
073263
! 		Make new window N high.
073263
  
073263
  CTRL-W f					*CTRL-W_f* *CTRL-W_CTRL-F*
073263
  CTRL-W CTRL-F	Split current window in two.  Edit file name under cursor.
073263
*** ../vim-7.4.565/src/ex_cmds.h	2015-01-07 15:57:13.145559792 +0100
073263
--- src/ex_cmds.h	2015-01-07 16:13:24.406265045 +0100
073263
***************
073263
*** 133,140 ****
073263
  			BANG|RANGE|NOTADR|FILES|TRLBAR,
073263
  			ADDR_ARGUMENTS),
073263
  EX(CMD_argdo,		"argdo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM,
073263
! 			ADDR_LINES),
073263
  EX(CMD_argedit,		"argedit",	ex_argedit,
073263
  			BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR,
073263
  			ADDR_ARGUMENTS),
073263
--- 133,140 ----
073263
  			BANG|RANGE|NOTADR|FILES|TRLBAR,
073263
  			ADDR_ARGUMENTS),
073263
  EX(CMD_argdo,		"argdo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
073263
! 			ADDR_ARGUMENTS),
073263
  EX(CMD_argedit,		"argedit",	ex_argedit,
073263
  			BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR,
073263
  			ADDR_ARGUMENTS),
073263
***************
073263
*** 220,227 ****
073263
  			BANG|TRLBAR|CMDWIN,
073263
  			ADDR_LINES),
073263
  EX(CMD_bufdo,		"bufdo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM,
073263
! 			ADDR_LINES),
073263
  EX(CMD_bunload,		"bunload",	ex_bunload,
073263
  			BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
073263
  			ADDR_LOADED_BUFFERS),
073263
--- 220,227 ----
073263
  			BANG|TRLBAR|CMDWIN,
073263
  			ADDR_LINES),
073263
  EX(CMD_bufdo,		"bufdo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
073263
! 			ADDR_BUFFERS),
073263
  EX(CMD_bunload,		"bunload",	ex_bunload,
073263
  			BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
073263
  			ADDR_LOADED_BUFFERS),
073263
***************
073263
*** 1384,1391 ****
073263
  			RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN,
073263
  			ADDR_TABS),
073263
  EX(CMD_tabdo,		"tabdo",	ex_listdo,
073263
! 			NEEDARG|EXTRA|NOTRLCOM,
073263
! 			ADDR_LINES),
073263
  EX(CMD_tabedit,		"tabedit",	ex_splitview,
073263
  			BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR,
073263
  			ADDR_TABS),
073263
--- 1384,1391 ----
073263
  			RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN,
073263
  			ADDR_TABS),
073263
  EX(CMD_tabdo,		"tabdo",	ex_listdo,
073263
! 			NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
073263
! 			ADDR_TABS),
073263
  EX(CMD_tabedit,		"tabedit",	ex_splitview,
073263
  			BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR,
073263
  			ADDR_TABS),
073263
***************
073263
*** 1576,1583 ****
073263
  			NEEDARG|WORD1|RANGE|NOTADR,
073263
  			ADDR_WINDOWS),
073263
  EX(CMD_windo,		"windo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM,
073263
! 			ADDR_LINES),
073263
  EX(CMD_winpos,		"winpos",	ex_winpos,
073263
  			EXTRA|TRLBAR|CMDWIN,
073263
  			ADDR_LINES),
073263
--- 1576,1583 ----
073263
  			NEEDARG|WORD1|RANGE|NOTADR,
073263
  			ADDR_WINDOWS),
073263
  EX(CMD_windo,		"windo",	ex_listdo,
073263
! 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
073263
! 			ADDR_WINDOWS),
073263
  EX(CMD_winpos,		"winpos",	ex_winpos,
073263
  			EXTRA|TRLBAR|CMDWIN,
073263
  			ADDR_LINES),
073263
*** ../vim-7.4.565/src/ex_cmds2.c	2014-11-19 16:38:01.512679964 +0100
073263
--- src/ex_cmds2.c	2015-01-07 16:12:42.526751920 +0100
073263
***************
073263
*** 2472,2486 ****
073263
  				    | (eap->forceit ? CCGD_FORCEIT : 0)
073263
  				    | CCGD_EXCMD))
073263
      {
073263
- 	/* start at the first argument/window/buffer */
073263
  	i = 0;
073263
  #ifdef FEAT_WINDOWS
073263
  	wp = firstwin;
073263
  	tp = first_tabpage;
073263
  #endif
073263
  	/* set pcmark now */
073263
  	if (eap->cmdidx == CMD_bufdo)
073263
! 	    goto_buffer(eap, DOBUF_FIRST, FORWARD, 0);
073263
  	else
073263
  	    setpcmark();
073263
  	listcmd_busy = TRUE;	    /* avoids setting pcmark below */
073263
--- 2472,2507 ----
073263
  				    | (eap->forceit ? CCGD_FORCEIT : 0)
073263
  				    | CCGD_EXCMD))
073263
      {
073263
  	i = 0;
073263
+ 	/* start at the eap->line1 argument/window/buffer */
073263
  #ifdef FEAT_WINDOWS
073263
  	wp = firstwin;
073263
  	tp = first_tabpage;
073263
  #endif
073263
+ 	switch (eap->cmdidx)
073263
+ 	{
073263
+ #ifdef FEAT_WINDOWS
073263
+ 	    case CMD_windo:
073263
+ 		for ( ; wp != NULL && i + 1 < eap->line1; wp = wp->w_next)
073263
+ 		    i++;
073263
+ 		break;
073263
+ 	    case CMD_tabdo:
073263
+ 		for( ; tp != NULL && i + 1 < eap->line1; tp = tp->tp_next)
073263
+ 		    i++;
073263
+ 		break;
073263
+ #endif
073263
+ 	    case CMD_argdo:
073263
+ 		i = eap->line1 - 1;
073263
+ 		break;
073263
+ 	    case CMD_bufdo:
073263
+ 		i = eap->line1;
073263
+ 		break;
073263
+ 	    default:
073263
+ 		break;
073263
+ 	}
073263
  	/* set pcmark now */
073263
  	if (eap->cmdidx == CMD_bufdo)
073263
! 	    goto_buffer(eap, DOBUF_FIRST, FORWARD, i);
073263
  	else
073263
  	    setpcmark();
073263
  	listcmd_busy = TRUE;	    /* avoids setting pcmark below */
073263
***************
073263
*** 2506,2512 ****
073263
  		}
073263
  		if (curwin->w_arg_idx != i)
073263
  		    break;
073263
- 		++i;
073263
  	    }
073263
  #ifdef FEAT_WINDOWS
073263
  	    else if (eap->cmdidx == CMD_windo)
073263
--- 2527,2532 ----
073263
***************
073263
*** 2541,2546 ****
073263
--- 2561,2568 ----
073263
  		    }
073263
  	    }
073263
  
073263
+ 	    ++i;
073263
+ 
073263
  	    /* execute the command */
073263
  	    do_cmdline(eap->arg, eap->getline, eap->cookie,
073263
  						DOCMD_VERBOSE + DOCMD_NOWAIT);
073263
***************
073263
*** 2548,2554 ****
073263
  	    if (eap->cmdidx == CMD_bufdo)
073263
  	    {
073263
  		/* Done? */
073263
! 		if (next_fnum < 0)
073263
  		    break;
073263
  		/* Check if the buffer still exists. */
073263
  		for (buf = firstbuf; buf != NULL; buf = buf->b_next)
073263
--- 2570,2576 ----
073263
  	    if (eap->cmdidx == CMD_bufdo)
073263
  	    {
073263
  		/* Done? */
073263
! 		if (next_fnum < 0 || next_fnum > eap->line2)
073263
  		    break;
073263
  		/* Check if the buffer still exists. */
073263
  		for (buf = firstbuf; buf != NULL; buf = buf->b_next)
073263
***************
073263
*** 2579,2584 ****
073263
--- 2601,2614 ----
073263
  		    do_check_scrollbind(TRUE);
073263
  #endif
073263
  	    }
073263
+ 
073263
+ #ifdef FEAT_WINDOWS
073263
+ 	    if (eap->cmdidx == CMD_windo || eap->cmdidx == CMD_tabdo)
073263
+ 		if (i+1 > eap->line2)
073263
+ 		    break;
073263
+ #endif
073263
+ 	    if (eap->cmdidx == CMD_argdo && i >= eap->line2)
073263
+ 		break;
073263
  	}
073263
  	listcmd_busy = FALSE;
073263
      }
073263
*** ../vim-7.4.565/src/testdir/test_command_count.in	2015-01-07 15:57:13.145559792 +0100
073263
--- src/testdir/test_command_count.in	2015-01-07 16:19:57.217698877 +0100
073263
***************
073263
*** 90,95 ****
073263
--- 90,129 ----
073263
  :only!
073263
  :e! test.out
073263
  :call append(0, g:lines)
073263
+ :unlet g:lines
073263
+ :w|bd
073263
+ :se hidden
073263
+ :b1
073263
+ ENDTEST
073263
+ 
073263
+ STARTTEST
073263
+ :only!
073263
+ :let g:lines = []
073263
+ :%argd
073263
+ :arga a b c d e f
073263
+ :3argu
073263
+ :let args = ''
073263
+ :.,$-argdo let args .= ' '.expand('%')
073263
+ :call add(g:lines, 'argdo:' . args)
073263
+ :split|split|split|split
073263
+ :2wincmd w
073263
+ :let windows = ''
073263
+ :.,$-windo let windows .= ' '.winnr()
073263
+ :call add(g:lines, 'windo:'. windows)
073263
+ :b2
073263
+ :let buffers = ''
073263
+ :.,$-bufdo let buffers .= ' '.bufnr('%')
073263
+ :call add(g:lines, 'bufdo:' . buffers)
073263
+ :let buffers = ''
073263
+ :3,7bufdo let buffers .= ' '.bufnr('%')
073263
+ :call add(g:lines, 'bufdo:' . buffers)
073263
+ :tabe|tabe|tabe|tabe
073263
+ :normal! 2gt
073263
+ :let tabpages = ''
073263
+ :.,$-tabdo let tabpages .= ' '.tabpagenr()
073263
+ :call add(g:lines, 'tabdo:' . tabpages)
073263
+ :e! test.out
073263
+ :call append('$', g:lines)
073263
  :w|qa!
073263
  ENDTEST
073263
  
073263
*** ../vim-7.4.565/src/testdir/test_command_count.ok	2015-01-07 15:57:13.145559792 +0100
073263
--- src/testdir/test_command_count.ok	2015-01-07 16:19:51.805761782 +0100
073263
***************
073263
*** 28,30 ****
073263
--- 28,35 ----
073263
  $+tabe E16: Invalid range
073263
  0tabm x
073263
  
073263
+ argdo: c d e
073263
+ windo: 2 3 4
073263
+ bufdo: 2 3 4 5 6 7 8 9 10 12
073263
+ bufdo: 3 4 5 6 7
073263
+ tabdo: 2 3 4
073263
*** ../vim-7.4.565/src/version.c	2015-01-07 15:57:13.149559746 +0100
073263
--- src/version.c	2015-01-07 16:50:24.620511525 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     566,
073263
  /**/
073263
073263
-- 
073263
ERROR 047: Keyboard not found.  Press RETURN to continue.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///