Problem: The items used by getqflist() and setqflist() don't match.
Solution: Support the "bufnum" item for setqflist(). (Yegappan Lakshmanan)
Files: runtime/doc/eval.txt, src/quickfix.c
*** ../vim-7.0.190/runtime/doc/eval.txt Wed Nov 1 15:31:02 2006
--- runtime/doc/eval.txt Sun Feb 4 01:54:35 2007
***************
*** 2897,2908 ****
vcol non-zero: "col" is visual column
zero: "col" is byte index
nr error number
text description of the error
type type of the error, 'E', '1', etc.
valid non-zero: recognized error message
When there is no error list or it's empty an empty list is
! returned.
Useful application: Find pattern matches in multiple files and
do something with them: >
--- 2912,2925 ----
vcol non-zero: "col" is visual column
zero: "col" is byte index
nr error number
+ pattern search pattern used to locate the error
text description of the error
type type of the error, 'E', '1', etc.
valid non-zero: recognized error message
When there is no error list or it's empty an empty list is
! returned. Quickfix list entries with non-existing buffer
! number are returned with "bufnr" set to zero.
Useful application: Find pattern matches in multiple files and
do something with them: >
***************
*** 4371,4377 ****
Non-dictionary items in {list} are ignored. Each dictionary
item can contain the following entries:
! filename name of a file
lnum line number in the file
pattern search pattern used to locate the error
col column number
--- 4401,4410 ----
Non-dictionary items in {list} are ignored. Each dictionary
item can contain the following entries:
! bufnr buffer number; must be the number of a valid
! buffer
! filename name of a file; only used when "bufnr" is not
! present or it is invalid.
lnum line number in the file
pattern search pattern used to locate the error
col column number
***************
*** 4384,4394 ****
The "col", "vcol", "nr", "type" and "text" entries are
optional. Either "lnum" or "pattern" entry can be used to
locate a matching error line.
! If the "filename" entry is not present or neither the "lnum"
! or "pattern" entries are present, then the item will not be
! handled as an error line.
If both "pattern" and "lnum" are present then "pattern" will
be used.
If {action} is set to 'a', then the items from {list} are
added to the existing quickfix list. If there is no existing
--- 4417,4429 ----
The "col", "vcol", "nr", "type" and "text" entries are
optional. Either "lnum" or "pattern" entry can be used to
locate a matching error line.
! If the "filename" and "bufnr" entries are not present or
! neither the "lnum" or "pattern" entries are present, then the
! item will not be handled as an error line.
If both "pattern" and "lnum" are present then "pattern" will
be used.
+ Note that the list is not exactly the same as what
+ |getqflist()| returns.
If {action} is set to 'a', then the items from {list} are
added to the existing quickfix list. If there is no existing
*** ../vim-7.0.190/src/quickfix.c Fri Oct 20 20:15:05 2006
--- src/quickfix.c Sun Feb 4 01:50:17 2007
***************
*** 106,112 ****
static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast));
static void qf_new_list __ARGS((qf_info_T *qi));
! static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
static void qf_msg __ARGS((qf_info_T *qi));
static void qf_free __ARGS((qf_info_T *qi, int idx));
static char_u *qf_types __ARGS((int, int));
--- 106,112 ----
static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast));
static void qf_new_list __ARGS((qf_info_T *qi));
! static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
static void qf_msg __ARGS((qf_info_T *qi));
static void qf_free __ARGS((qf_info_T *qi, int idx));