4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: ":cnext" moves to the error in the next file, but there is no
13 Solution: Add ":cpfile" and ":cNfile".
14 Files: src/ex_cmds.h, src/quickfix.c, src/vim.h, runtime/doc/quickfix.txt
17 *** ../vim-6.2.248/src/ex_cmds.h Sun Feb 8 17:07:07 2004
18 --- src/ex_cmds.h Tue Feb 10 15:18:46 2004
22 BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY),
23 EX(CMD_cNext, "cNext", ex_cnext,
24 RANGE|NOTADR|COUNT|TRLBAR|BANG),
25 + EX(CMD_cNfile, "cNfile", ex_cnext,
26 + RANGE|NOTADR|COUNT|TRLBAR|BANG),
27 EX(CMD_cabbrev, "cabbrev", ex_abbreviate,
28 EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
29 EX(CMD_cabclear, "cabclear", ex_abclear,
33 EX(CMD_copen, "copen", ex_copen,
34 RANGE|NOTADR|COUNT|TRLBAR),
35 EX(CMD_cprevious, "cprevious", ex_cnext,
36 + RANGE|NOTADR|COUNT|TRLBAR|BANG),
37 + EX(CMD_cpfile, "cpfile", ex_cnext,
38 RANGE|NOTADR|COUNT|TRLBAR|BANG),
39 EX(CMD_cquit, "cquit", ex_cquit,
41 *** ../vim-6.2.248/src/quickfix.c Mon Dec 29 20:21:49 2003
42 --- src/quickfix.c Tue Feb 10 15:24:52 2004
46 * jump to a quickfix line
47 * if dir == FORWARD go "errornr" valid entries forward
48 * if dir == BACKWARD go "errornr" valid entries backward
49 + * if dir == FORWARD_FILE go "errornr" valid entries files backward
50 + * if dir == BACKWARD_FILE go "errornr" valid entries files backward
51 * else if "errornr" is zero, redisplay the same line
52 * else go to entry "errornr"
59 ! else if (dir == BACKWARD) /* previous valid entry */
64 prev_index = qf_index;
67 if (qf_index == 1 || qf_ptr->qf_prev == NULL)
72 ! else if (dir == BACKWARD || dir == BACKWARD_FILE) /* prev. valid entry */
77 prev_index = qf_index;
78 + old_qf_fnum = qf_ptr->qf_fnum;
81 if (qf_index == 1 || qf_ptr->qf_prev == NULL)
86 qf_ptr = qf_ptr->qf_prev;
87 ! } while (!qf_lists[qf_curlist].qf_nonevalid && !qf_ptr->qf_valid);
94 qf_ptr = qf_ptr->qf_prev;
95 ! } while ((!qf_lists[qf_curlist].qf_nonevalid && !qf_ptr->qf_valid)
96 ! || (dir == BACKWARD_FILE && qf_ptr->qf_fnum == old_qf_fnum));
103 : eap->cmdidx == CMD_cnfile
106 eap->addr_count > 0 ? (int)eap->line2 : 1, eap->forceit);
111 : eap->cmdidx == CMD_cnfile
113 ! : (eap->cmdidx == CMD_cpfile || eap->cmdidx == CMD_cNfile)
116 eap->addr_count > 0 ? (int)eap->line2 : 1, eap->forceit);
119 *** ../vim-6.2.248/src/vim.h Mon Feb 2 12:53:51 2004
120 --- src/vim.h Tue Feb 10 15:22:15 2004
125 #define BACKWARD (-1)
126 #define FORWARD_FILE 3
127 + #define BACKWARD_FILE (-3)
129 /* return values for functions */
130 #if !(defined(OK) && (OK == 1))
131 *** ../vim-6.2.248/runtime/doc/quickfix.txt Sun Jun 1 12:20:34 2003
132 --- runtime/doc/quickfix.txt Tue Feb 10 15:17:25 2004
135 ! *quickfix.txt* For Vim version 6.2. Last change: 2003 May 30
138 VIM REFERENCE MANUAL by Bram Moolenaar
140 ! *quickfix.txt* For Vim version 6.2. Last change: 2004 Feb 10
143 VIM REFERENCE MANUAL by Bram Moolenaar
147 the [count] next error. See |:cc| for [!] and
150 + :[count]cNf[ile][!] *:cpf* *:cpfile* *:cNf* *:cNfile*
151 + :[count]cpf[ile][!] Display the last error in the [count] previous file in
152 + the list that includes a file name. If there are no
153 + file names at all or if there is no next file, go to
154 + the [count] previous error. See |:cc| for [!] and
158 :cr[ewind][!] [nr] Display error [nr]. If [nr] is omitted, the FIRST
159 error is displayed. See |:cc|.
160 *** ../vim-6.2.248/src/version.c Mon Feb 9 18:45:58 2004
161 --- src/version.c Tue Feb 10 19:31:39 2004
165 { /* Add new patch number below this line */
172 ...for the taxes that I pay because it means that I am employed.
174 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
175 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
176 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
177 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///