jkunstle / rpms / vim

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