Karsten Hopp cdccbc
To: vim_dev@googlegroups.com
Karsten Hopp cdccbc
Subject: Patch 7.4.858
Karsten Hopp cdccbc
Fcc: outbox
Karsten Hopp cdccbc
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp cdccbc
Mime-Version: 1.0
Karsten Hopp cdccbc
Content-Type: text/plain; charset=UTF-8
Karsten Hopp cdccbc
Content-Transfer-Encoding: 8bit
Karsten Hopp cdccbc
------------
Karsten Hopp cdccbc
Karsten Hopp cdccbc
Patch 7.4.858
Karsten Hopp cdccbc
Problem:    It's a bit clumsy to execute a command on a list of matches.
Karsten Hopp cdccbc
Solution:   Add the ":ldo", ":lfdo", ":cdo" and ":cfdo" commands. (Yegappan
Karsten Hopp cdccbc
            Lakshmanan)
Karsten Hopp cdccbc
Files:      runtime/doc/cmdline.txt, runtime/doc/editing.txt,
Karsten Hopp cdccbc
            runtime/doc/index.txt, runtime/doc/quickfix.txt,
Karsten Hopp cdccbc
            runtime/doc/tabpage.txt, runtime/doc/windows.txt, src/ex_cmds.h,
Karsten Hopp cdccbc
            src/ex_cmds2.c, src/ex_docmd.c, src/proto/quickfix.pro,
Karsten Hopp cdccbc
            src/quickfix.c, src/testdir/Make_amiga.mak,
Karsten Hopp cdccbc
            src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
Karsten Hopp cdccbc
            src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
Karsten Hopp cdccbc
            src/testdir/Makefile, src/testdir/test_cdo.in,
Karsten Hopp cdccbc
            src/testdir/test_cdo.ok
Karsten Hopp cdccbc
Karsten Hopp cdccbc
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/cmdline.txt	2014-02-23 23:38:58.812760280 +0100
Karsten Hopp cdccbc
--- runtime/doc/cmdline.txt	2015-09-08 18:07:42.256948348 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 511,516 ****
Karsten Hopp cdccbc
--- 511,518 ----
Karsten Hopp cdccbc
      :argdo
Karsten Hopp cdccbc
      :autocmd
Karsten Hopp cdccbc
      :bufdo
Karsten Hopp cdccbc
+     :cdo
Karsten Hopp cdccbc
+     :cfdo
Karsten Hopp cdccbc
      :command
Karsten Hopp cdccbc
      :cscope
Karsten Hopp cdccbc
      :debug
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 521,526 ****
Karsten Hopp cdccbc
--- 523,530 ----
Karsten Hopp cdccbc
      :help
Karsten Hopp cdccbc
      :helpfind
Karsten Hopp cdccbc
      :lcscope
Karsten Hopp cdccbc
+     :ldo
Karsten Hopp cdccbc
+     :lfdo
Karsten Hopp cdccbc
      :make
Karsten Hopp cdccbc
      :normal
Karsten Hopp cdccbc
      :perl
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/editing.txt	2015-01-07 16:52:53.506792420 +0100
Karsten Hopp cdccbc
--- runtime/doc/editing.txt	2015-09-08 18:07:42.256948348 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 854,860 ****
Karsten Hopp cdccbc
  			each file.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:windo|, |:tabdo| and |:bufdo|.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  Example: >
Karsten Hopp cdccbc
  	:args *.c
Karsten Hopp cdccbc
--- 868,875 ----
Karsten Hopp cdccbc
  			each file.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
Karsten Hopp cdccbc
! 			|:cfdo| and |:lfdo|
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  Example: >
Karsten Hopp cdccbc
  	:args *.c
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/index.txt	2014-09-19 19:39:30.762446025 +0200
Karsten Hopp cdccbc
--- runtime/doc/index.txt	2015-09-08 18:10:53.402969644 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 1133,1138 ****
Karsten Hopp cdccbc
--- 1138,1145 ----
Karsten Hopp cdccbc
  |:cc|		:cc		go to specific error
Karsten Hopp cdccbc
  |:cclose|	:ccl[ose]	close quickfix window
Karsten Hopp cdccbc
  |:cd|		:cd		change directory
Karsten Hopp cdccbc
+ |:cdo|		:cdo		execute command in each valid error list entry
Karsten Hopp cdccbc
+ |:cfdo|		:cfd[o]		execute command in each file in error list
Karsten Hopp cdccbc
  |:center|	:ce[nter]	format lines at the center
Karsten Hopp cdccbc
  |:cexpr|	:cex[pr]	read errors from expr and jump to first
Karsten Hopp cdccbc
  |:cfile|	:cf[ile]	read file with error messages and jump to first
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 1290,1295 ****
Karsten Hopp cdccbc
--- 1298,1305 ----
Karsten Hopp cdccbc
  |:lchdir|	:lch[dir]	change directory locally
Karsten Hopp cdccbc
  |:lclose|	:lcl[ose]	close location window
Karsten Hopp cdccbc
  |:lcscope|	:lcs[cope]      like ":cscope" but uses location list
Karsten Hopp cdccbc
+ |:ldo|		:ld[o]		execute command in valid location list entries
Karsten Hopp cdccbc
+ |:lfdo|		:lfd[o]		execute command in each file in location list
Karsten Hopp cdccbc
  |:left|		:le[ft]		left align lines
Karsten Hopp cdccbc
  |:leftabove|	:lefta[bove]	make split window appear left or above
Karsten Hopp cdccbc
  |:let|		:let		assign a value to a variable or option
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/quickfix.txt	2014-02-23 23:38:58.820760280 +0100
Karsten Hopp cdccbc
--- runtime/doc/quickfix.txt	2015-09-08 18:27:53.564412123 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 299,321 ****
Karsten Hopp cdccbc
  	au QuickfixCmdPost make call QfMakeConv()
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  =============================================================================
Karsten Hopp cdccbc
  2. The error window					*quickfix-window*
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  					    *:cope* *:copen* *w:quickfix_title*
Karsten Hopp cdccbc
  :cope[n] [height]	Open a window to show the current list of errors.
Karsten Hopp cdccbc
  			When [height] is given, the window becomes that high
Karsten Hopp cdccbc
! 			(if there is room).  Otherwise the window is made ten
Karsten Hopp cdccbc
! 			lines high.
Karsten Hopp cdccbc
! 			The window will contain a special buffer, with
Karsten Hopp cdccbc
! 			'buftype' equal to "quickfix".  Don't change this!
Karsten Hopp cdccbc
  			If there already is a quickfix window, it will be made
Karsten Hopp cdccbc
  			the current window.  It is not possible to open a
Karsten Hopp cdccbc
! 			second quickfix window. The window will have the
Karsten Hopp cdccbc
! 			w:quickfix_title variable set which will indicate the
Karsten Hopp cdccbc
! 			command that produced the quickfix list. This can be
Karsten Hopp cdccbc
! 			used to compose a custom status line if the value of
Karsten Hopp cdccbc
! 			'statusline' is adjusted properly.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  							*:lop* *:lopen*
Karsten Hopp cdccbc
  :lop[en] [height]	Open a window to show the location list for the
Karsten Hopp cdccbc
--- 299,395 ----
Karsten Hopp cdccbc
  	au QuickfixCmdPost make call QfMakeConv()
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
+ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
Karsten Hopp cdccbc
+ 							*:cdo*
Karsten Hopp cdccbc
+ :cdo[!] {cmd}		Execute {cmd} in each valid entry in the quickfix list.
Karsten Hopp cdccbc
+ 			It works like doing this: >
Karsten Hopp cdccbc
+ 				:cfirst
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				:cnext
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				etc.
Karsten Hopp cdccbc
+ <			When the current file can't be |abandon|ed and the [!]
Karsten Hopp cdccbc
+ 			is not present, the command fails.
Karsten Hopp cdccbc
+ 			When an error is detected excecution stops.
Karsten Hopp cdccbc
+ 			The last buffer (or where an error occurred) becomes
Karsten Hopp cdccbc
+ 			the current buffer.
Karsten Hopp cdccbc
+ 			{cmd} can contain '|' to concatenate several commands.
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 			Only valid entries in the quickfix list are used.
Karsten Hopp cdccbc
+ 			A range can be used to select entries, e.g.: >
Karsten Hopp cdccbc
+ 				:10,$cdo cmd
Karsten Hopp cdccbc
+ <			To skip entries 1 to 9.
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 			Note: While this command is executing, the Syntax
Karsten Hopp cdccbc
+ 			autocommand event is disabled by adding it to
Karsten Hopp cdccbc
+ 			'eventignore'.  This considerably speeds up editing
Karsten Hopp cdccbc
+ 			each buffer.
Karsten Hopp cdccbc
+ 			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
+ 			|+listcmds| feature}
Karsten Hopp cdccbc
+ 			Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
Karsten Hopp cdccbc
+ 			|:ldo|, |:cfdo| and |:lfdo|.
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 							*:cfdo*
Karsten Hopp cdccbc
+ :cfdo[!] {cmd}		Execute {cmd} in each file in the quickfix list.
Karsten Hopp cdccbc
+ 			It works like doing this: >
Karsten Hopp cdccbc
+ 				:cfirst
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				:cnfile
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				etc.
Karsten Hopp cdccbc
+ <			Otherwise it works the same as `:cdo`.
Karsten Hopp cdccbc
+ 			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
+ 			|+listcmds| feature}
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 							*:ldo*
Karsten Hopp cdccbc
+ :ld[o][!] {cmd}		Execute {cmd} in each valid entry in the location list
Karsten Hopp cdccbc
+ 			for the current window.
Karsten Hopp cdccbc
+ 			It works like doing this: >
Karsten Hopp cdccbc
+ 				:lfirst
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				:lnext
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				etc.
Karsten Hopp cdccbc
+ <			Only valid entries in the location list are used.
Karsten Hopp cdccbc
+ 			Otherwise it works the same as `:cdo`.
Karsten Hopp cdccbc
+ 			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
+ 			|+listcmds| feature}
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 							*:lfdo*
Karsten Hopp cdccbc
+ :lfdo[!] {cmd}		Execute {cmd} in each file in the location list for
Karsten Hopp cdccbc
+ 			the current window.
Karsten Hopp cdccbc
+ 			It works like doing this: >
Karsten Hopp cdccbc
+ 				:lfirst
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				:lnfile
Karsten Hopp cdccbc
+ 				:{cmd}
Karsten Hopp cdccbc
+ 				etc.
Karsten Hopp cdccbc
+ <			Otherwise it works the same as `:ldo`.
Karsten Hopp cdccbc
+ 			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
+ 			|+listcmds| feature}
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
  =============================================================================
Karsten Hopp cdccbc
  2. The error window					*quickfix-window*
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  					    *:cope* *:copen* *w:quickfix_title*
Karsten Hopp cdccbc
  :cope[n] [height]	Open a window to show the current list of errors.
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
  			When [height] is given, the window becomes that high
Karsten Hopp cdccbc
! 			(if there is room).  When [height] is omitted the
Karsten Hopp cdccbc
! 			window is made ten lines high.
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
  			If there already is a quickfix window, it will be made
Karsten Hopp cdccbc
  			the current window.  It is not possible to open a
Karsten Hopp cdccbc
! 			second quickfix window.  If [height] is given the
Karsten Hopp cdccbc
! 			existing window will be resized to it.
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
! 			The window will contain a special buffer, with
Karsten Hopp cdccbc
! 			'buftype' equal to "quickfix".  Don't change this!
Karsten Hopp cdccbc
! 			The window will have the w:quickfix_title variable set
Karsten Hopp cdccbc
! 			which will indicate the command that produced the
Karsten Hopp cdccbc
! 			quickfix list. This can be used to compose a custom
Karsten Hopp cdccbc
! 			status line if the value of 'statusline' is adjusted
Karsten Hopp cdccbc
! 			properly.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  							*:lop* *:lopen*
Karsten Hopp cdccbc
  :lop[en] [height]	Open a window to show the location list for the
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/tabpage.txt	2015-04-21 18:08:21.838719097 +0200
Karsten Hopp cdccbc
--- runtime/doc/tabpage.txt	2015-09-08 18:07:42.256948348 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 248,254 ****
Karsten Hopp cdccbc
  		{cmd} must not open or close tab pages or reorder them.
Karsten Hopp cdccbc
  		{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  		|+listcmds| feature}
Karsten Hopp cdccbc
! 		Also see |:windo|, |:argdo| and |:bufdo|.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  ==============================================================================
Karsten Hopp cdccbc
  3. Other items						*tab-page-other*
Karsten Hopp cdccbc
--- 248,255 ----
Karsten Hopp cdccbc
  		{cmd} must not open or close tab pages or reorder them.
Karsten Hopp cdccbc
  		{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  		|+listcmds| feature}
Karsten Hopp cdccbc
! 		Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
Karsten Hopp cdccbc
! 		and |:lfdo|
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  ==============================================================================
Karsten Hopp cdccbc
  3. Other items						*tab-page-other*
Karsten Hopp cdccbc
*** ../vim-7.4.857/runtime/doc/windows.txt	2015-07-21 15:03:00.691467213 +0200
Karsten Hopp cdccbc
--- runtime/doc/windows.txt	2015-09-08 18:07:42.256948348 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 715,721 ****
Karsten Hopp cdccbc
  			{cmd} must not open or close windows or reorder them.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:tabdo|, |:argdo| and |:bufdo|.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  							*:bufdo*
Karsten Hopp cdccbc
  :[range]bufdo[!] {cmd}	Execute {cmd} in each buffer in the buffer list or if
Karsten Hopp cdccbc
--- 715,722 ----
Karsten Hopp cdccbc
  			{cmd} must not open or close windows or reorder them.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
Karsten Hopp cdccbc
! 			|:cfdo| and |:lfdo|
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  							*:bufdo*
Karsten Hopp cdccbc
  :[range]bufdo[!] {cmd}	Execute {cmd} in each buffer in the buffer list or if
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 743,749 ****
Karsten Hopp cdccbc
  			each buffer.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:tabdo|, |:argdo| and |:windo|.
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  Examples: >
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
--- 744,751 ----
Karsten Hopp cdccbc
  			each buffer.
Karsten Hopp cdccbc
  			{not in Vi} {not available when compiled without the
Karsten Hopp cdccbc
  			|+listcmds| feature}
Karsten Hopp cdccbc
! 			Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
Karsten Hopp cdccbc
! 			|:cfdo| and |:lfdo|
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  Examples: >
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/ex_cmds.h	2015-07-21 15:03:00.691467213 +0200
Karsten Hopp cdccbc
--- src/ex_cmds.h	2015-09-08 18:20:51.228782439 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 65,70 ****
Karsten Hopp cdccbc
--- 65,71 ----
Karsten Hopp cdccbc
  #define ADDR_LOADED_BUFFERS	3
Karsten Hopp cdccbc
  #define ADDR_BUFFERS		4
Karsten Hopp cdccbc
  #define ADDR_TABS		5
Karsten Hopp cdccbc
+ #define ADDR_QUICKFIX		6
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  #ifndef DO_DECLARE_EXCMD
Karsten Hopp cdccbc
  typedef struct exarg exarg_T;
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 270,275 ****
Karsten Hopp cdccbc
--- 271,279 ----
Karsten Hopp cdccbc
  EX(CMD_cd,		"cd",		ex_cd,
Karsten Hopp cdccbc
  			BANG|FILE1|TRLBAR|CMDWIN,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
+ EX(CMD_cdo,		"cdo",		ex_listdo,
Karsten Hopp cdccbc
+ 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
Karsten Hopp cdccbc
+ 			ADDR_QUICKFIX),
Karsten Hopp cdccbc
  EX(CMD_center,		"center",	ex_align,
Karsten Hopp cdccbc
  			TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 279,284 ****
Karsten Hopp cdccbc
--- 283,291 ----
Karsten Hopp cdccbc
  EX(CMD_cfile,		"cfile",	ex_cfile,
Karsten Hopp cdccbc
  			TRLBAR|FILE1|BANG,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
+ EX(CMD_cfdo,		"cfdo",		ex_listdo,
Karsten Hopp cdccbc
+ 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
Karsten Hopp cdccbc
+ 			ADDR_QUICKFIX),
Karsten Hopp cdccbc
  EX(CMD_cfirst,		"cfirst",	ex_cc,
Karsten Hopp cdccbc
  			RANGE|NOTADR|COUNT|TRLBAR|BANG,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 729,734 ****
Karsten Hopp cdccbc
--- 736,744 ----
Karsten Hopp cdccbc
  EX(CMD_lcscope,		"lcscope",	do_cscope,
Karsten Hopp cdccbc
  			EXTRA|NOTRLCOM|XFILE,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
+ EX(CMD_ldo,		"ldo",		ex_listdo,
Karsten Hopp cdccbc
+ 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
Karsten Hopp cdccbc
+ 			ADDR_QUICKFIX),
Karsten Hopp cdccbc
  EX(CMD_left,		"left",		ex_align,
Karsten Hopp cdccbc
  			TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 744,749 ****
Karsten Hopp cdccbc
--- 754,762 ----
Karsten Hopp cdccbc
  EX(CMD_lfile,		"lfile",	ex_cfile,
Karsten Hopp cdccbc
  			TRLBAR|FILE1|BANG,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
+ EX(CMD_lfdo,		"lfdo",		ex_listdo,
Karsten Hopp cdccbc
+ 			BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
Karsten Hopp cdccbc
+ 			ADDR_QUICKFIX),
Karsten Hopp cdccbc
  EX(CMD_lfirst,		"lfirst",	ex_cc,
Karsten Hopp cdccbc
  			RANGE|NOTADR|COUNT|TRLBAR|BANG,
Karsten Hopp cdccbc
  			ADDR_LINES),
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/ex_cmds2.c	2015-08-11 19:13:55.134175736 +0200
Karsten Hopp cdccbc
--- src/ex_cmds2.c	2015-09-08 18:24:57.594233149 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2429,2435 ****
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
!  * ":argdo", ":windo", ":bufdo", ":tabdo"
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_listdo(eap)
Karsten Hopp cdccbc
--- 2429,2435 ----
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
!  * ":argdo", ":windo", ":bufdo", ":tabdo", ":cdo", ":ldo", ":cfdo" and ":lfdo"
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_listdo(eap)
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2446,2451 ****
Karsten Hopp cdccbc
--- 2446,2455 ----
Karsten Hopp cdccbc
      char_u	*save_ei = NULL;
Karsten Hopp cdccbc
  #endif
Karsten Hopp cdccbc
      char_u	*p_shm_save;
Karsten Hopp cdccbc
+ #ifdef FEAT_QUICKFIX
Karsten Hopp cdccbc
+     int		qf_size;
Karsten Hopp cdccbc
+     int		qf_idx;
Karsten Hopp cdccbc
+ #endif
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  #ifndef FEAT_WINDOWS
Karsten Hopp cdccbc
      if (eap->cmdidx == CMD_windo)
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2498,2515 ****
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
  	/* set pcmark now */
Karsten Hopp cdccbc
  	if (eap->cmdidx == CMD_bufdo)
Karsten Hopp cdccbc
!         {
Karsten Hopp cdccbc
  	    /* Advance to the first listed buffer after "eap->line1". */
Karsten Hopp cdccbc
!             for (buf = firstbuf; buf != NULL && (buf->b_fnum < eap->line1
Karsten Hopp cdccbc
  					  || !buf->b_p_bl); buf = buf->b_next)
Karsten Hopp cdccbc
  		if (buf->b_fnum > eap->line2)
Karsten Hopp cdccbc
  		{
Karsten Hopp cdccbc
  		    buf = NULL;
Karsten Hopp cdccbc
  		    break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
!             if (buf != NULL)
Karsten Hopp cdccbc
  		goto_buffer(eap, DOBUF_FIRST, FORWARD, buf->b_fnum);
Karsten Hopp cdccbc
!         }
Karsten Hopp cdccbc
  	else
Karsten Hopp cdccbc
  	    setpcmark();
Karsten Hopp cdccbc
  	listcmd_busy = TRUE;	    /* avoids setting pcmark below */
Karsten Hopp cdccbc
--- 2502,2538 ----
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
  	/* set pcmark now */
Karsten Hopp cdccbc
  	if (eap->cmdidx == CMD_bufdo)
Karsten Hopp cdccbc
! 	{
Karsten Hopp cdccbc
  	    /* Advance to the first listed buffer after "eap->line1". */
Karsten Hopp cdccbc
! 	    for (buf = firstbuf; buf != NULL && (buf->b_fnum < eap->line1
Karsten Hopp cdccbc
  					  || !buf->b_p_bl); buf = buf->b_next)
Karsten Hopp cdccbc
  		if (buf->b_fnum > eap->line2)
Karsten Hopp cdccbc
  		{
Karsten Hopp cdccbc
  		    buf = NULL;
Karsten Hopp cdccbc
  		    break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
! 	    if (buf != NULL)
Karsten Hopp cdccbc
  		goto_buffer(eap, DOBUF_FIRST, FORWARD, buf->b_fnum);
Karsten Hopp cdccbc
! 	}
Karsten Hopp cdccbc
! #ifdef FEAT_QUICKFIX
Karsten Hopp cdccbc
! 	else if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
Karsten Hopp cdccbc
! 		|| eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
! 	{
Karsten Hopp cdccbc
! 	    qf_size = qf_get_size(eap);
Karsten Hopp cdccbc
! 	    if (qf_size <= 0 || eap->line1 > qf_size)
Karsten Hopp cdccbc
! 		buf = NULL;
Karsten Hopp cdccbc
! 	    else
Karsten Hopp cdccbc
! 	    {
Karsten Hopp cdccbc
! 		ex_cc(eap);
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
! 		buf = curbuf;
Karsten Hopp cdccbc
! 		i = eap->line1 - 1;
Karsten Hopp cdccbc
! 		if (eap->addr_count <= 0)
Karsten Hopp cdccbc
! 		    /* default is all the quickfix/location list entries */
Karsten Hopp cdccbc
! 		    eap->line2 = qf_size;
Karsten Hopp cdccbc
! 	    }
Karsten Hopp cdccbc
! 	}
Karsten Hopp cdccbc
! #endif
Karsten Hopp cdccbc
  	else
Karsten Hopp cdccbc
  	    setpcmark();
Karsten Hopp cdccbc
  	listcmd_busy = TRUE;	    /* avoids setting pcmark below */
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2595,2605 ****
Karsten Hopp cdccbc
  		set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
Karsten Hopp cdccbc
  		vim_free(p_shm_save);
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
! 		/* If autocommands took us elsewhere, quit here */
Karsten Hopp cdccbc
  		if (curbuf->b_fnum != next_fnum)
Karsten Hopp cdccbc
  		    break;
Karsten Hopp cdccbc
  	    }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  	    if (eap->cmdidx == CMD_windo)
Karsten Hopp cdccbc
  	    {
Karsten Hopp cdccbc
  		validate_cursor();	/* cursor may have moved */
Karsten Hopp cdccbc
--- 2618,2645 ----
Karsten Hopp cdccbc
  		set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
Karsten Hopp cdccbc
  		vim_free(p_shm_save);
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
! 		/* If autocommands took us elsewhere, quit here. */
Karsten Hopp cdccbc
  		if (curbuf->b_fnum != next_fnum)
Karsten Hopp cdccbc
  		    break;
Karsten Hopp cdccbc
  	    }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
+ #ifdef FEAT_QUICKFIX
Karsten Hopp cdccbc
+ 	    if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo
Karsten Hopp cdccbc
+ 		    || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
+ 	    {
Karsten Hopp cdccbc
+ 		if (i >= qf_size || i >= eap->line2)
Karsten Hopp cdccbc
+ 		    break;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 		qf_idx = qf_get_cur_idx(eap);
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 		ex_cnext(eap);
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 		/* If jumping to the next quickfix entry fails, quit here */
Karsten Hopp cdccbc
+ 		if (qf_get_cur_idx(eap) == qf_idx)
Karsten Hopp cdccbc
+ 		    break;
Karsten Hopp cdccbc
+ 	    }
Karsten Hopp cdccbc
+ #endif
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
  	    if (eap->cmdidx == CMD_windo)
Karsten Hopp cdccbc
  	    {
Karsten Hopp cdccbc
  		validate_cursor();	/* cursor may have moved */
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/ex_docmd.c	2015-08-11 18:52:58.073121563 +0200
Karsten Hopp cdccbc
--- src/ex_docmd.c	2015-09-08 18:07:42.260948306 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 135,141 ****
Karsten Hopp cdccbc
  #endif
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  static int	check_more __ARGS((int, int));
Karsten Hopp cdccbc
! static linenr_T get_address __ARGS((char_u **, int addr_type, int skip, int to_other_file));
Karsten Hopp cdccbc
  static void	get_flags __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
  #if !defined(FEAT_PERL) \
Karsten Hopp cdccbc
  	|| !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
Karsten Hopp cdccbc
--- 135,141 ----
Karsten Hopp cdccbc
  #endif
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  static int	check_more __ARGS((int, int));
Karsten Hopp cdccbc
! static linenr_T get_address __ARGS((exarg_T *, char_u **, int addr_type, int skip, int to_other_file));
Karsten Hopp cdccbc
  static void	get_flags __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
  #if !defined(FEAT_PERL) \
Karsten Hopp cdccbc
  	|| !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2173,2181 ****
Karsten Hopp cdccbc
  		lnum = CURRENT_TAB_NR;
Karsten Hopp cdccbc
  		ea.line2 = lnum;
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
  	ea.cmd = skipwhite(ea.cmd);
Karsten Hopp cdccbc
! 	lnum = get_address(&ea.cmd, ea.addr_type, ea.skip, ea.addr_count == 0);
Karsten Hopp cdccbc
  	if (ea.cmd == NULL)		    /* error detected */
Karsten Hopp cdccbc
  	    goto doend;
Karsten Hopp cdccbc
  	if (lnum == MAXLNUM)
Karsten Hopp cdccbc
--- 2173,2184 ----
Karsten Hopp cdccbc
  		lnum = CURRENT_TAB_NR;
Karsten Hopp cdccbc
  		ea.line2 = lnum;
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
+ 	    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 		ea.line2 = qf_get_cur_valid_idx(&ea);
Karsten Hopp cdccbc
+ 		break;
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
  	ea.cmd = skipwhite(ea.cmd);
Karsten Hopp cdccbc
! 	lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip, ea.addr_count == 0);
Karsten Hopp cdccbc
  	if (ea.cmd == NULL)		    /* error detected */
Karsten Hopp cdccbc
  	    goto doend;
Karsten Hopp cdccbc
  	if (lnum == MAXLNUM)
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2233,2238 ****
Karsten Hopp cdccbc
--- 2236,2247 ----
Karsten Hopp cdccbc
  			    ea.line2 = ARGCOUNT;
Karsten Hopp cdccbc
  			}
Karsten Hopp cdccbc
  			break;
Karsten Hopp cdccbc
+ 		    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 			ea.line1 = 1;
Karsten Hopp cdccbc
+ 			ea.line2 = qf_get_size(&ea);
Karsten Hopp cdccbc
+ 			if (ea.line2 == 0)
Karsten Hopp cdccbc
+ 			    ea.line2 = 1;
Karsten Hopp cdccbc
+ 			break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
  		++ea.addr_count;
Karsten Hopp cdccbc
  	    }
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2693,2698 ****
Karsten Hopp cdccbc
--- 2702,2712 ----
Karsten Hopp cdccbc
  		else
Karsten Hopp cdccbc
  		    ea.line2 = ARGCOUNT;
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
+ 	    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 		ea.line2 = qf_get_size(&ea);
Karsten Hopp cdccbc
+ 		if (ea.line2 == 0)
Karsten Hopp cdccbc
+ 		    ea.line2 = 1;
Karsten Hopp cdccbc
+ 		break;
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 3839,3844 ****
Karsten Hopp cdccbc
--- 3853,3860 ----
Karsten Hopp cdccbc
  	case CMD_botright:
Karsten Hopp cdccbc
  	case CMD_browse:
Karsten Hopp cdccbc
  	case CMD_bufdo:
Karsten Hopp cdccbc
+ 	case CMD_cdo:
Karsten Hopp cdccbc
+ 	case CMD_cfdo:
Karsten Hopp cdccbc
  	case CMD_confirm:
Karsten Hopp cdccbc
  	case CMD_debug:
Karsten Hopp cdccbc
  	case CMD_folddoclosed:
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 3848,3854 ****
Karsten Hopp cdccbc
--- 3864,3872 ----
Karsten Hopp cdccbc
  	case CMD_keepjumps:
Karsten Hopp cdccbc
  	case CMD_keepmarks:
Karsten Hopp cdccbc
  	case CMD_keeppatterns:
Karsten Hopp cdccbc
+ 	case CMD_ldo:
Karsten Hopp cdccbc
  	case CMD_leftabove:
Karsten Hopp cdccbc
+ 	case CMD_lfdo:
Karsten Hopp cdccbc
  	case CMD_lockmarks:
Karsten Hopp cdccbc
  	case CMD_noautocmd:
Karsten Hopp cdccbc
  	case CMD_noswapfile:
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4321,4327 ****
Karsten Hopp cdccbc
   * Return MAXLNUM when no Ex address was found.
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      static linenr_T
Karsten Hopp cdccbc
! get_address(ptr, addr_type, skip, to_other_file)
Karsten Hopp cdccbc
      char_u	**ptr;
Karsten Hopp cdccbc
      int		addr_type;  /* flag: one of ADDR_LINES, ... */
Karsten Hopp cdccbc
      int		skip;	    /* only skip the address, don't use it */
Karsten Hopp cdccbc
--- 4339,4346 ----
Karsten Hopp cdccbc
   * Return MAXLNUM when no Ex address was found.
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      static linenr_T
Karsten Hopp cdccbc
! get_address(eap, ptr, addr_type, skip, to_other_file)
Karsten Hopp cdccbc
!     exarg_T	*eap;
Karsten Hopp cdccbc
      char_u	**ptr;
Karsten Hopp cdccbc
      int		addr_type;  /* flag: one of ADDR_LINES, ... */
Karsten Hopp cdccbc
      int		skip;	    /* only skip the address, don't use it */
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4362,4367 ****
Karsten Hopp cdccbc
--- 4381,4389 ----
Karsten Hopp cdccbc
  		    case ADDR_TABS:
Karsten Hopp cdccbc
  			lnum = CURRENT_TAB_NR;
Karsten Hopp cdccbc
  			break;
Karsten Hopp cdccbc
+ 		    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 			lnum = qf_get_cur_valid_idx(eap);
Karsten Hopp cdccbc
+ 			break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4394,4399 ****
Karsten Hopp cdccbc
--- 4416,4426 ----
Karsten Hopp cdccbc
  		    case ADDR_TABS:
Karsten Hopp cdccbc
  			lnum = LAST_TAB_NR;
Karsten Hopp cdccbc
  			break;
Karsten Hopp cdccbc
+ 		    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 			lnum = qf_get_size(eap);
Karsten Hopp cdccbc
+ 			if (lnum == 0)
Karsten Hopp cdccbc
+ 			    lnum = 1;
Karsten Hopp cdccbc
+ 			break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4569,4574 ****
Karsten Hopp cdccbc
--- 4596,4604 ----
Karsten Hopp cdccbc
  		    case ADDR_TABS:
Karsten Hopp cdccbc
  			lnum = CURRENT_TAB_NR;
Karsten Hopp cdccbc
  			break;
Karsten Hopp cdccbc
+ 		    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 			lnum = qf_get_cur_valid_idx(eap);
Karsten Hopp cdccbc
+ 			break;
Karsten Hopp cdccbc
  		}
Karsten Hopp cdccbc
  	    }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4707,4712 ****
Karsten Hopp cdccbc
--- 4737,4746 ----
Karsten Hopp cdccbc
  		if (eap->line2 > LAST_TAB_NR)
Karsten Hopp cdccbc
  		    return (char_u *)_(e_invrange);
Karsten Hopp cdccbc
  		break;
Karsten Hopp cdccbc
+ 	    case ADDR_QUICKFIX:
Karsten Hopp cdccbc
+ 		if (eap->line2 != 1 && eap->line2 > qf_get_size(eap))
Karsten Hopp cdccbc
+ 		    return (char_u *)_(e_invrange);
Karsten Hopp cdccbc
+ 		break;
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
      return NULL;
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 5817,5822 ****
Karsten Hopp cdccbc
--- 5851,5857 ----
Karsten Hopp cdccbc
      {ADDR_TABS, "tabs"},
Karsten Hopp cdccbc
      {ADDR_BUFFERS, "buffers"},
Karsten Hopp cdccbc
      {ADDR_WINDOWS, "windows"},
Karsten Hopp cdccbc
+     {ADDR_QUICKFIX, "quickfix"},
Karsten Hopp cdccbc
      {-1, NULL}
Karsten Hopp cdccbc
  };
Karsten Hopp cdccbc
  #endif
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 9224,9230 ****
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      long	n;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     n = get_address(&eap->arg, eap->addr_type, FALSE, FALSE);
Karsten Hopp cdccbc
      if (eap->arg == NULL)	    /* error detected */
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	eap->nextcmd = NULL;
Karsten Hopp cdccbc
--- 9259,9265 ----
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      long	n;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE);
Karsten Hopp cdccbc
      if (eap->arg == NULL)	    /* error detected */
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	eap->nextcmd = NULL;
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/proto/quickfix.pro	2013-08-10 13:37:24.000000000 +0200
Karsten Hopp cdccbc
--- src/proto/quickfix.pro	2015-09-08 18:29:04.723675697 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 17,22 ****
Karsten Hopp cdccbc
--- 17,25 ----
Karsten Hopp cdccbc
  int buf_hide __ARGS((buf_T *buf));
Karsten Hopp cdccbc
  int grep_internal __ARGS((cmdidx_T cmdidx));
Karsten Hopp cdccbc
  void ex_make __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
+ int qf_get_size __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
+ int qf_get_cur_idx __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
+ int qf_get_cur_valid_idx __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
  void ex_cc __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
  void ex_cnext __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
  void ex_cfile __ARGS((exarg_T *eap));
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/quickfix.c	2015-06-19 18:35:29.683602295 +0200
Karsten Hopp cdccbc
--- src/quickfix.c	2015-09-08 18:30:09.711003127 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 1373,1379 ****
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
   * Check in which directory of the directory stack the given file can be
Karsten Hopp cdccbc
   * found.
Karsten Hopp cdccbc
!  * Returns a pointer to the directory name or NULL if not found
Karsten Hopp cdccbc
   * Cleans up intermediate directory entries.
Karsten Hopp cdccbc
   *
Karsten Hopp cdccbc
   * TODO: How to solve the following problem?
Karsten Hopp cdccbc
--- 1373,1379 ----
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
   * Check in which directory of the directory stack the given file can be
Karsten Hopp cdccbc
   * found.
Karsten Hopp cdccbc
!  * Returns a pointer to the directory name or NULL if not found.
Karsten Hopp cdccbc
   * Cleans up intermediate directory entries.
Karsten Hopp cdccbc
   *
Karsten Hopp cdccbc
   * TODO: How to solve the following problem?
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 2990,3008 ****
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
   * ":cc", ":crewind", ":cfirst" and ":clast".
Karsten Hopp cdccbc
   * ":ll", ":lrewind", ":lfirst" and ":llast".
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_cc(eap)
Karsten Hopp cdccbc
      exarg_T	*eap;
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
      if (eap->cmdidx == CMD_ll
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lrewind
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lfirst
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_llast)
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
  	if (qi == NULL)
Karsten Hopp cdccbc
--- 2990,3172 ----
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
+  * Returns the number of valid entries in the current quickfix/location list.
Karsten Hopp cdccbc
+  */
Karsten Hopp cdccbc
+     int
Karsten Hopp cdccbc
+ qf_get_size(eap)
Karsten Hopp cdccbc
+     exarg_T	*eap;
Karsten Hopp cdccbc
+ {
Karsten Hopp cdccbc
+     qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
+     qfline_T	*qfp;
Karsten Hopp cdccbc
+     int		i, sz = 0;
Karsten Hopp cdccbc
+     int		prev_fnum = 0;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	/* Location list */
Karsten Hopp cdccbc
+ 	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
+ 	if (qi == NULL)
Karsten Hopp cdccbc
+ 	    return 0;
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     for (i = 0, qfp = qi->qf_lists[qi->qf_curlist].qf_start;
Karsten Hopp cdccbc
+ 	    (i < qi->qf_lists[qi->qf_curlist].qf_count) && (qfp != NULL);
Karsten Hopp cdccbc
+ 	    ++i, qfp = qfp->qf_next)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	if (qfp->qf_valid)
Karsten Hopp cdccbc
+ 	{
Karsten Hopp cdccbc
+ 	    if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo)
Karsten Hopp cdccbc
+ 		sz++;	/* Count all valid entries */
Karsten Hopp cdccbc
+ 	    else if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
Karsten Hopp cdccbc
+ 	    {
Karsten Hopp cdccbc
+ 		/* Count the number of files */
Karsten Hopp cdccbc
+ 		sz++;
Karsten Hopp cdccbc
+ 		prev_fnum = qfp->qf_fnum;
Karsten Hopp cdccbc
+ 	    }
Karsten Hopp cdccbc
+ 	}
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     return sz;
Karsten Hopp cdccbc
+ }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ /*
Karsten Hopp cdccbc
+  * Returns the current index of the quickfix/location list.
Karsten Hopp cdccbc
+  * Returns 0 if there is an error.
Karsten Hopp cdccbc
+  */
Karsten Hopp cdccbc
+     int
Karsten Hopp cdccbc
+ qf_get_cur_idx(eap)
Karsten Hopp cdccbc
+     exarg_T	*eap;
Karsten Hopp cdccbc
+ {
Karsten Hopp cdccbc
+     qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	/* Location list */
Karsten Hopp cdccbc
+ 	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
+ 	if (qi == NULL)
Karsten Hopp cdccbc
+ 	    return 0;
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     return qi->qf_lists[qi->qf_curlist].qf_index;
Karsten Hopp cdccbc
+ }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ /*
Karsten Hopp cdccbc
+  * Returns the current index in the quickfix/location list (counting only valid
Karsten Hopp cdccbc
+  * entries). If no valid entries are in the list, then returns 1.
Karsten Hopp cdccbc
+  */
Karsten Hopp cdccbc
+     int
Karsten Hopp cdccbc
+ qf_get_cur_valid_idx(eap)
Karsten Hopp cdccbc
+     exarg_T	*eap;
Karsten Hopp cdccbc
+ {
Karsten Hopp cdccbc
+     qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
+     qf_list_T	*qfl;
Karsten Hopp cdccbc
+     qfline_T	*qfp;
Karsten Hopp cdccbc
+     int		i, eidx = 0;
Karsten Hopp cdccbc
+     int		prev_fnum = 0;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	/* Location list */
Karsten Hopp cdccbc
+ 	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
+ 	if (qi == NULL)
Karsten Hopp cdccbc
+ 	    return 1;
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     qfl = &qi->qf_lists[qi->qf_curlist];
Karsten Hopp cdccbc
+     qfp = qfl->qf_start;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     /* check if the list has valid errors */
Karsten Hopp cdccbc
+     if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
Karsten Hopp cdccbc
+ 	return 1;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     for (i = 1; i <= qfl->qf_index && qfp!= NULL; i++, qfp = qfp->qf_next)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	if (qfp->qf_valid)
Karsten Hopp cdccbc
+ 	{
Karsten Hopp cdccbc
+ 	    if (eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
+ 	    {
Karsten Hopp cdccbc
+ 		if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
Karsten Hopp cdccbc
+ 		{
Karsten Hopp cdccbc
+ 		    /* Count the number of files */
Karsten Hopp cdccbc
+ 		    eidx++;
Karsten Hopp cdccbc
+ 		    prev_fnum = qfp->qf_fnum;
Karsten Hopp cdccbc
+ 		}
Karsten Hopp cdccbc
+ 	    }
Karsten Hopp cdccbc
+ 	    else
Karsten Hopp cdccbc
+ 		eidx++;
Karsten Hopp cdccbc
+ 	}
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     return eidx ? eidx : 1;
Karsten Hopp cdccbc
+ }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ /*
Karsten Hopp cdccbc
+  * Get the 'n'th valid error entry in the quickfix or location list.
Karsten Hopp cdccbc
+  * Used by :cdo, :ldo, :cfdo and :lfdo commands.
Karsten Hopp cdccbc
+  * For :cdo and :ldo returns the 'n'th valid error entry.
Karsten Hopp cdccbc
+  * For :cfdo and :lfdo returns the 'n'th valid file entry.
Karsten Hopp cdccbc
+  */
Karsten Hopp cdccbc
+     static int
Karsten Hopp cdccbc
+ qf_get_nth_valid_entry(qi, n, fdo)
Karsten Hopp cdccbc
+     qf_info_T	*qi;
Karsten Hopp cdccbc
+     int		n;
Karsten Hopp cdccbc
+     int		fdo;
Karsten Hopp cdccbc
+ {
Karsten Hopp cdccbc
+     qf_list_T	*qfl = &qi->qf_lists[qi->qf_curlist];
Karsten Hopp cdccbc
+     qfline_T	*qfp = qfl->qf_start;
Karsten Hopp cdccbc
+     int		i, eidx;
Karsten Hopp cdccbc
+     int		prev_fnum = 0;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     /* check if the list has valid errors */
Karsten Hopp cdccbc
+     if (qfl->qf_count <= 0 || qfl->qf_nonevalid)
Karsten Hopp cdccbc
+ 	return 1;
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     for (i = 1, eidx = 0; i <= qfl->qf_count && qfp!= NULL;
Karsten Hopp cdccbc
+ 	    i++, qfp = qfp->qf_next)
Karsten Hopp cdccbc
+     {
Karsten Hopp cdccbc
+ 	if (qfp->qf_valid)
Karsten Hopp cdccbc
+ 	{
Karsten Hopp cdccbc
+ 	    if (fdo)
Karsten Hopp cdccbc
+ 	    {
Karsten Hopp cdccbc
+ 		if (qfp->qf_fnum > 0 && qfp->qf_fnum != prev_fnum)
Karsten Hopp cdccbc
+ 		{
Karsten Hopp cdccbc
+ 		    /* Count the number of files */
Karsten Hopp cdccbc
+ 		    eidx++;
Karsten Hopp cdccbc
+ 		    prev_fnum = qfp->qf_fnum;
Karsten Hopp cdccbc
+ 		}
Karsten Hopp cdccbc
+ 	    }
Karsten Hopp cdccbc
+ 	    else
Karsten Hopp cdccbc
+ 		eidx++;
Karsten Hopp cdccbc
+ 	}
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ 	if (eidx == n)
Karsten Hopp cdccbc
+ 	    break;
Karsten Hopp cdccbc
+     }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+     if (i <= qfl->qf_count)
Karsten Hopp cdccbc
+ 	return i;
Karsten Hopp cdccbc
+     else
Karsten Hopp cdccbc
+ 	return 1;
Karsten Hopp cdccbc
+ }
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ /*
Karsten Hopp cdccbc
   * ":cc", ":crewind", ":cfirst" and ":clast".
Karsten Hopp cdccbc
   * ":ll", ":lrewind", ":lfirst" and ":llast".
Karsten Hopp cdccbc
+  * ":cdo", ":ldo", ":cfdo" and ":lfdo"
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_cc(eap)
Karsten Hopp cdccbc
      exarg_T	*eap;
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
+     int		errornr;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
      if (eap->cmdidx == CMD_ll
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lrewind
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lfirst
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_llast
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_ldo
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
  	if (qi == NULL)
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 3012,3045 ****
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     qf_jump(qi, 0,
Karsten Hopp cdccbc
! 	    eap->addr_count > 0
Karsten Hopp cdccbc
! 	    ? (int)eap->line2
Karsten Hopp cdccbc
! 	    : (eap->cmdidx == CMD_cc || eap->cmdidx == CMD_ll)
Karsten Hopp cdccbc
! 		? 0
Karsten Hopp cdccbc
! 		: (eap->cmdidx == CMD_crewind || eap->cmdidx == CMD_lrewind
Karsten Hopp cdccbc
! 		   || eap->cmdidx == CMD_cfirst || eap->cmdidx == CMD_lfirst)
Karsten Hopp cdccbc
! 		    ? 1
Karsten Hopp cdccbc
! 		    : 32767,
Karsten Hopp cdccbc
! 	    eap->forceit);
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
   * ":cnext", ":cnfile", ":cNext" and ":cprevious".
Karsten Hopp cdccbc
   * ":lnext", ":lNext", ":lprevious", ":lnfile", ":lNfile" and ":lpfile".
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_cnext(eap)
Karsten Hopp cdccbc
      exarg_T	*eap;
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
      if (eap->cmdidx == CMD_lnext
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lNext
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lprevious
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lnfile
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lNfile
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_lpfile)
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
  	if (qi == NULL)
Karsten Hopp cdccbc
--- 3176,3226 ----
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     if (eap->addr_count > 0)
Karsten Hopp cdccbc
! 	errornr = (int)eap->line2;
Karsten Hopp cdccbc
!     else
Karsten Hopp cdccbc
!     {
Karsten Hopp cdccbc
! 	if (eap->cmdidx == CMD_cc || eap->cmdidx == CMD_ll)
Karsten Hopp cdccbc
! 	    errornr = 0;
Karsten Hopp cdccbc
! 	else if (eap->cmdidx == CMD_crewind || eap->cmdidx == CMD_lrewind
Karsten Hopp cdccbc
! 		|| eap->cmdidx == CMD_cfirst || eap->cmdidx == CMD_lfirst)
Karsten Hopp cdccbc
! 	    errornr = 1;
Karsten Hopp cdccbc
! 	else
Karsten Hopp cdccbc
! 	    errornr = 32767;
Karsten Hopp cdccbc
!     }
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
!     /* For cdo and ldo commands, jump to the nth valid error.
Karsten Hopp cdccbc
!      * For cfdo and lfdo commands, jump to the nth valid file entry.
Karsten Hopp cdccbc
!      */
Karsten Hopp cdccbc
!     if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo ||
Karsten Hopp cdccbc
! 	    eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
! 	errornr = qf_get_nth_valid_entry(qi,
Karsten Hopp cdccbc
! 		eap->addr_count > 0 ? (int)eap->line1 : 1,
Karsten Hopp cdccbc
! 		eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo);
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
!     qf_jump(qi, 0, errornr, eap->forceit);
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
   * ":cnext", ":cnfile", ":cNext" and ":cprevious".
Karsten Hopp cdccbc
   * ":lnext", ":lNext", ":lprevious", ":lnfile", ":lNfile" and ":lpfile".
Karsten Hopp cdccbc
+  * Also, used by ":cdo", ":ldo", ":cfdo" and ":lfdo" commands.
Karsten Hopp cdccbc
   */
Karsten Hopp cdccbc
      void
Karsten Hopp cdccbc
  ex_cnext(eap)
Karsten Hopp cdccbc
      exarg_T	*eap;
Karsten Hopp cdccbc
  {
Karsten Hopp cdccbc
      qf_info_T	*qi = &ql_info;
Karsten Hopp cdccbc
+     int		errornr;
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
      if (eap->cmdidx == CMD_lnext
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lNext
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lprevious
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lnfile
Karsten Hopp cdccbc
  	    || eap->cmdidx == CMD_lNfile
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_lpfile
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_ldo
Karsten Hopp cdccbc
! 	    || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
      {
Karsten Hopp cdccbc
  	qi = GET_LOC_LIST(curwin);
Karsten Hopp cdccbc
  	if (qi == NULL)
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 3049,3063 ****
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     qf_jump(qi, (eap->cmdidx == CMD_cnext || eap->cmdidx == CMD_lnext)
Karsten Hopp cdccbc
  	    ? FORWARD
Karsten Hopp cdccbc
! 	    : (eap->cmdidx == CMD_cnfile || eap->cmdidx == CMD_lnfile)
Karsten Hopp cdccbc
  		? FORWARD_FILE
Karsten Hopp cdccbc
  		: (eap->cmdidx == CMD_cpfile || eap->cmdidx == CMD_lpfile
Karsten Hopp cdccbc
  		   || eap->cmdidx == CMD_cNfile || eap->cmdidx == CMD_lNfile)
Karsten Hopp cdccbc
  		    ? BACKWARD_FILE
Karsten Hopp cdccbc
  		    : BACKWARD,
Karsten Hopp cdccbc
! 	    eap->addr_count > 0 ? (int)eap->line2 : 1, eap->forceit);
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
--- 3230,3253 ----
Karsten Hopp cdccbc
  	}
Karsten Hopp cdccbc
      }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
!     if (eap->addr_count > 0 &&
Karsten Hopp cdccbc
! 	    (eap->cmdidx != CMD_cdo && eap->cmdidx != CMD_ldo &&
Karsten Hopp cdccbc
! 	     eap->cmdidx != CMD_cfdo && eap->cmdidx != CMD_lfdo))
Karsten Hopp cdccbc
! 	errornr = (int)eap->line2;
Karsten Hopp cdccbc
!     else
Karsten Hopp cdccbc
! 	errornr = 1;
Karsten Hopp cdccbc
! 
Karsten Hopp cdccbc
!     qf_jump(qi, (eap->cmdidx == CMD_cnext || eap->cmdidx == CMD_lnext
Karsten Hopp cdccbc
! 		|| eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo)
Karsten Hopp cdccbc
  	    ? FORWARD
Karsten Hopp cdccbc
! 	    : (eap->cmdidx == CMD_cnfile || eap->cmdidx == CMD_lnfile
Karsten Hopp cdccbc
! 		|| eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
Karsten Hopp cdccbc
  		? FORWARD_FILE
Karsten Hopp cdccbc
  		: (eap->cmdidx == CMD_cpfile || eap->cmdidx == CMD_lpfile
Karsten Hopp cdccbc
  		   || eap->cmdidx == CMD_cNfile || eap->cmdidx == CMD_lNfile)
Karsten Hopp cdccbc
  		    ? BACKWARD_FILE
Karsten Hopp cdccbc
  		    : BACKWARD,
Karsten Hopp cdccbc
! 	    errornr, eap->forceit);
Karsten Hopp cdccbc
  }
Karsten Hopp cdccbc
  
Karsten Hopp cdccbc
  /*
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Make_amiga.mak	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Make_amiga.mak	2015-09-08 18:33:40.696822313 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 41,46 ****
Karsten Hopp cdccbc
--- 41,47 ----
Karsten Hopp cdccbc
  		test_autocmd_option.out \
Karsten Hopp cdccbc
  		test_autoformat_join.out \
Karsten Hopp cdccbc
  		test_breakindent.out \
Karsten Hopp cdccbc
+ 		test_cdo.out \
Karsten Hopp cdccbc
  		test_changelist.out \
Karsten Hopp cdccbc
  		test_charsearch.out \
Karsten Hopp cdccbc
  		test_close_count.out \
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 195,200 ****
Karsten Hopp cdccbc
--- 196,202 ----
Karsten Hopp cdccbc
  test_autocmd_option.out: test_autocmd_option.in
Karsten Hopp cdccbc
  test_autoformat_join.out: test_autoformat_join.in
Karsten Hopp cdccbc
  test_breakindent.out: test_breakindent.in
Karsten Hopp cdccbc
+ test_cdo.out: test_cdo.in
Karsten Hopp cdccbc
  test_changelist.out: test_changelist.in
Karsten Hopp cdccbc
  test_charsearch.out: test_charsearch.in
Karsten Hopp cdccbc
  test_close_count.out: test_close_count.in
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Make_dos.mak	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Make_dos.mak	2015-09-08 18:33:24.828984002 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 40,45 ****
Karsten Hopp cdccbc
--- 40,46 ----
Karsten Hopp cdccbc
  		test_autocmd_option.out \
Karsten Hopp cdccbc
  		test_autoformat_join.out \
Karsten Hopp cdccbc
  		test_breakindent.out \
Karsten Hopp cdccbc
+ 		test_cdo.out \
Karsten Hopp cdccbc
  		test_changelist.out \
Karsten Hopp cdccbc
  		test_charsearch.out \
Karsten Hopp cdccbc
  		test_close_count.out \
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Make_ming.mak	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Make_ming.mak	2015-09-08 18:33:54.412682545 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 62,67 ****
Karsten Hopp cdccbc
--- 62,68 ----
Karsten Hopp cdccbc
  		test_autocmd_option.out \
Karsten Hopp cdccbc
  		test_autoformat_join.out \
Karsten Hopp cdccbc
  		test_breakindent.out \
Karsten Hopp cdccbc
+ 		test_cdo.out \
Karsten Hopp cdccbc
  		test_changelist.out \
Karsten Hopp cdccbc
  		test_charsearch.out \
Karsten Hopp cdccbc
  		test_close_count.out \
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Make_os2.mak	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Make_os2.mak	2015-09-08 18:34:06.004564414 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 42,47 ****
Karsten Hopp cdccbc
--- 42,48 ----
Karsten Hopp cdccbc
  		test_autocmd_option.out \
Karsten Hopp cdccbc
  		test_autoformat_join.out \
Karsten Hopp cdccbc
  		test_breakindent.out \
Karsten Hopp cdccbc
+ 		test_cdo.out \
Karsten Hopp cdccbc
  		test_changelist.out \
Karsten Hopp cdccbc
  		test_charsearch.out \
Karsten Hopp cdccbc
  		test_close_count.out \
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Make_vms.mms	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Make_vms.mms	2015-09-08 18:34:18.448437596 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 4,10 ****
Karsten Hopp cdccbc
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp cdccbc
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp cdccbc
  #
Karsten Hopp cdccbc
! # Last change:  2015 Sep 01
Karsten Hopp cdccbc
  #
Karsten Hopp cdccbc
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp cdccbc
  # Edit the lines in the Configuration section below to select.
Karsten Hopp cdccbc
--- 4,10 ----
Karsten Hopp cdccbc
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp cdccbc
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp cdccbc
  #
Karsten Hopp cdccbc
! # Last change:  2015 Sep 08
Karsten Hopp cdccbc
  #
Karsten Hopp cdccbc
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp cdccbc
  # Edit the lines in the Configuration section below to select.
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 101,106 ****
Karsten Hopp cdccbc
--- 101,107 ----
Karsten Hopp cdccbc
  	 test_autocmd_option.out \
Karsten Hopp cdccbc
  	 test_autoformat_join.out \
Karsten Hopp cdccbc
  	 test_breakindent.out \
Karsten Hopp cdccbc
+ 	 test_cdo.out \
Karsten Hopp cdccbc
  	 test_changelist.out \
Karsten Hopp cdccbc
  	 test_charsearch.out \
Karsten Hopp cdccbc
  	 test_close_count.out \
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/Makefile	2015-09-01 16:04:26.706472322 +0200
Karsten Hopp cdccbc
--- src/testdir/Makefile	2015-09-08 18:34:35.048268412 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 38,43 ****
Karsten Hopp cdccbc
--- 38,44 ----
Karsten Hopp cdccbc
  		test_autocmd_option.out \
Karsten Hopp cdccbc
  		test_autoformat_join.out \
Karsten Hopp cdccbc
  		test_breakindent.out \
Karsten Hopp cdccbc
+ 		test_cdo.out \
Karsten Hopp cdccbc
  		test_changelist.out \
Karsten Hopp cdccbc
  		test_charsearch.out \
Karsten Hopp cdccbc
  		test_close_count.out \
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/test_cdo.in	2015-09-08 18:42:16.203563949 +0200
Karsten Hopp cdccbc
--- src/testdir/test_cdo.in	2015-09-08 18:07:42.260948306 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 0 ****
Karsten Hopp cdccbc
--- 1,107 ----
Karsten Hopp cdccbc
+ Tests for the :cdo, :cfdo, :ldo and :lfdo commands
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ STARTTEST
Karsten Hopp cdccbc
+ :so small.vim
Karsten Hopp cdccbc
+ :if !has('quickfix') | e! test.ok | wq! test.out | endif
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :call writefile(["Line1", "Line2", "Line3"], 'Xtestfile1')
Karsten Hopp cdccbc
+ :call writefile(["Line1", "Line2", "Line3"], 'Xtestfile2')
Karsten Hopp cdccbc
+ :call writefile(["Line1", "Line2", "Line3"], 'Xtestfile3')
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :function RunTests(cchar)
Karsten Hopp cdccbc
+ :  let nl="\n"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  " Try with an empty list
Karsten Hopp cdccbc
+ :  exe a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " Populate the list and then try
Karsten Hopp cdccbc
+ :  exe a:cchar . "getexpr ['non-error 1', 'Xtestfile1:1:3:Line1', 'non-error 2', 'Xtestfile2:2:2:Line2', 'non-error 3', 'Xtestfile3:3:1:Line3']"
Karsten Hopp cdccbc
+ :  exe a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " Run command only on selected error lines
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "2,3" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  " Boundary condition tests
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "1,1" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "3" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  " Range test commands
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "%" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "1,$" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe a:cchar . 'prev'
Karsten Hopp cdccbc
+ :  exe "." . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  " Invalid error lines test
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  exe "27" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "4,5" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " Run commands from an unsaved buffer
Karsten Hopp cdccbc
+ :  let v:errmsg=''
Karsten Hopp cdccbc
+ :  enew
Karsten Hopp cdccbc
+ :  setlocal modified
Karsten Hopp cdccbc
+ :  exe "2,2" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  if v:errmsg =~# 'No write since last change'
Karsten Hopp cdccbc
+ :     let g:result .= 'Unsaved file change test passed' . nl
Karsten Hopp cdccbc
+ :  else
Karsten Hopp cdccbc
+ :     let g:result .= 'Unsaved file change test failed' . nl
Karsten Hopp cdccbc
+ :  endif
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " If the executed command fails, then the operation should be aborted
Karsten Hopp cdccbc
+ :  enew!
Karsten Hopp cdccbc
+ :  let subst_count = 0
Karsten Hopp cdccbc
+ :  exe a:cchar . "do s/Line/xLine/ | let subst_count += 1"
Karsten Hopp cdccbc
+ :  if subst_count == 1 && getline('.') == 'xLine1'
Karsten Hopp cdccbc
+ :     let g:result .= 'Abort command on error test passed' . nl
Karsten Hopp cdccbc
+ :  else
Karsten Hopp cdccbc
+ :     let g:result .= 'Abort command on error test failed' . nl
Karsten Hopp cdccbc
+ :  endif
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  exe "2,2" . a:cchar . "do! let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " List with no valid error entries
Karsten Hopp cdccbc
+ :  edit! +2 Xtestfile1
Karsten Hopp cdccbc
+ :  exe a:cchar . "getexpr ['non-error 1', 'non-error 2', 'non-error 3']"
Karsten Hopp cdccbc
+ :  exe a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "2" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  let v:errmsg=''
Karsten Hopp cdccbc
+ :  exe "%" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "1,$" . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "." . a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  let g:result .= v:errmsg
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " List with only one valid entry
Karsten Hopp cdccbc
+ :  exe a:cchar . "getexpr ['Xtestfile3:3:1:Line3']"
Karsten Hopp cdccbc
+ :  exe a:cchar . "do let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " Tests for :cfdo and :lfdo commands
Karsten Hopp cdccbc
+ :  exe a:cchar . "getexpr ['non-error 1', 'Xtestfile1:1:3:Line1', 'Xtestfile1:2:1:Line2', 'non-error 2', 'Xtestfile2:2:2:Line2', 'non-error 3', 'Xtestfile3:2:3:Line2', 'Xtestfile3:3:1:Line3']"
Karsten Hopp cdccbc
+ :  exe a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "3" . a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "2,3" . a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "%" . a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe "1,$" . a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :  exe a:cchar . 'pfile'
Karsten Hopp cdccbc
+ :  exe "." . a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :  " List with only one valid entry
Karsten Hopp cdccbc
+ :  exe a:cchar . "getexpr ['Xtestfile2:2:5:Line2']"
Karsten Hopp cdccbc
+ :  exe a:cchar . "fdo let g:result .= expand('%') . ' ' . line('.') . 'L' . ' ' . col('.') . 'C' . nl"
Karsten Hopp cdccbc
+ :endfunction
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :let result=''
Karsten Hopp cdccbc
+ :" Tests for the :cdo quickfix list command
Karsten Hopp cdccbc
+ :call RunTests('c')
Karsten Hopp cdccbc
+ :let result .= "\n"
Karsten Hopp cdccbc
+ :" Tests for the :ldo location list command
Karsten Hopp cdccbc
+ :call RunTests('l')
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ :edit! test.out
Karsten Hopp cdccbc
+ :0put =result
Karsten Hopp cdccbc
+ :wq!
Karsten Hopp cdccbc
+ ENDTEST
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/testdir/test_cdo.ok	2015-09-08 18:42:16.207563908 +0200
Karsten Hopp cdccbc
--- src/testdir/test_cdo.ok	2015-09-08 18:07:42.260948306 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 0 ****
Karsten Hopp cdccbc
--- 1,66 ----
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Unsaved file change test passed
Karsten Hopp cdccbc
+ Abort command on error test passed
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile2 2L 5C
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Unsaved file change test passed
Karsten Hopp cdccbc
+ Abort command on error test passed
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 3L 1C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile1 1L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile3 2L 3C
Karsten Hopp cdccbc
+ Xtestfile2 2L 2C
Karsten Hopp cdccbc
+ Xtestfile2 2L 5C
Karsten Hopp cdccbc
+ 
Karsten Hopp cdccbc
*** ../vim-7.4.857/src/version.c	2015-09-08 17:50:38.071546587 +0200
Karsten Hopp cdccbc
--- src/version.c	2015-09-08 18:07:17.353206130 +0200
Karsten Hopp cdccbc
***************
Karsten Hopp cdccbc
*** 743,744 ****
Karsten Hopp cdccbc
--- 743,746 ----
Karsten Hopp cdccbc
  {   /* Add new patch number below this line */
Karsten Hopp cdccbc
+ /**/
Karsten Hopp cdccbc
+     858,
Karsten Hopp cdccbc
  /**/
Karsten Hopp cdccbc
Karsten Hopp cdccbc
-- 
Karsten Hopp cdccbc
Why I like vim:
Karsten Hopp cdccbc
> I like VIM because, when I ask a question in this newsgroup, I get a
Karsten Hopp cdccbc
> one-line answer.  With xemacs, I get a 1Kb lisp script with bugs in it ;-)
Karsten Hopp cdccbc
Karsten Hopp cdccbc
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp cdccbc
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp cdccbc
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp cdccbc
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///