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