diff options
Diffstat (limited to 'data/vim/patches/8.1.1036')
-rw-r--r-- | data/vim/patches/8.1.1036 | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.1036 b/data/vim/patches/8.1.1036 new file mode 100644 index 000000000..5d112c65e --- /dev/null +++ b/data/vim/patches/8.1.1036 @@ -0,0 +1,271 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.1036 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.1036 +Problem: Quickfix function arguments are inconsistent. +Solution: Pass a list pointer to more functions. (Yegappan Lakshmanan, + closes #4149) +Files: src/quickfix.c + + +*** ../vim-8.1.1035/src/quickfix.c 2019-03-21 21:12:46.282715864 +0100 +--- src/quickfix.c 2019-03-22 14:14:13.850223057 +0100 +*************** +*** 1629,1645 **** + // make place for a new list + qf_new_list(qi, qf_title); + qf_idx = qi->qf_curlist; + } + else + { + // Adding to existing list, use last entry. + adding = TRUE; +! if (!qf_list_empty(qf_get_list(qi, qf_idx))) +! old_last = qi->qf_lists[qf_idx].qf_last; + } + +- qfl = qf_get_list(qi, qf_idx); +- + // Use the local value of 'errorformat' if it's set. + if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL) + efm = buf->b_p_efm; +--- 1629,1645 ---- + // make place for a new list + qf_new_list(qi, qf_title); + qf_idx = qi->qf_curlist; ++ qfl = qf_get_list(qi, qf_idx); + } + else + { + // Adding to existing list, use last entry. + adding = TRUE; +! qfl = qf_get_list(qi, qf_idx); +! if (!qf_list_empty(qfl)) +! old_last = qfl->qf_last; + } + + // Use the local value of 'errorformat' if it's set. + if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL) + efm = buf->b_p_efm; +*************** +*** 3921,3927 **** + // it if we have errors; otherwise, leave it closed. + if (qf_stack_empty(qi) + || qfl->qf_nonevalid +! || qf_list_empty(qf_get_curlist(qi))) + { + if (win != NULL) + ex_cclose(eap); +--- 3921,3927 ---- + // it if we have errors; otherwise, leave it closed. + if (qf_stack_empty(qi) + || qfl->qf_nonevalid +! || qf_list_empty(qfl)) + { + if (win != NULL) + ex_cclose(eap); +*************** +*** 5286,5292 **** + */ + static int + vgr_match_buflines( +! qf_info_T *qi, + char_u *fname, + buf_T *buf, + regmmatch_T *regmatch, +--- 5286,5292 ---- + */ + static int + vgr_match_buflines( +! qf_list_T *qfl, + char_u *fname, + buf_T *buf, + regmmatch_T *regmatch, +*************** +*** 5307,5313 **** + // Pass the buffer number so that it gets used even for a + // dummy buffer, unless duplicate_name is set, then the + // buffer will be wiped out below. +! if (qf_add_entry(qf_get_curlist(qi), + NULL, // dir + fname, + NULL, +--- 5307,5313 ---- + // Pass the buffer number so that it gets used even for a + // dummy buffer, unless duplicate_name is set, then the + // buffer will be wiped out below. +! if (qf_add_entry(qfl, + NULL, // dir + fname, + NULL, +*************** +*** 5535,5541 **** + { + // Try for a match in all lines of the buffer. + // For ":1vimgrep" look for first match only. +! found_match = vgr_match_buflines(qi, fname, buf, ®match, + &tomatch, duplicate_name, flags); + + if (using_dummy) +--- 5535,5542 ---- + { + // Try for a match in all lines of the buffer. + // For ":1vimgrep" look for first match only. +! found_match = vgr_match_buflines(qf_get_curlist(qi), +! fname, buf, ®match, + &tomatch, duplicate_name, flags); + + if (using_dummy) +*************** +*** 7082,7088 **** + */ + static void + hgr_search_file( +! qf_info_T *qi, + char_u *fname, + vimconv_T *p_vc, + regmatch_T *p_regmatch) +--- 7083,7089 ---- + */ + static void + hgr_search_file( +! qf_list_T *qfl, + char_u *fname, + vimconv_T *p_vc, + regmatch_T *p_regmatch) +*************** +*** 7117,7123 **** + while (l > 0 && line[l - 1] <= ' ') + line[--l] = NUL; + +! if (qf_add_entry(qf_get_curlist(qi), + NULL, // dir + fname, + NULL, +--- 7118,7124 ---- + while (l > 0 && line[l - 1] <= ' ') + line[--l] = NUL; + +! if (qf_add_entry(qfl, + NULL, // dir + fname, + NULL, +*************** +*** 7153,7159 **** + */ + static void + hgr_search_files_in_dir( +! qf_info_T *qi, + char_u *dirname, + regmatch_T *p_regmatch, + vimconv_T *p_vc +--- 7154,7160 ---- + */ + static void + hgr_search_files_in_dir( +! qf_list_T *qfl, + char_u *dirname, + regmatch_T *p_regmatch, + vimconv_T *p_vc +*************** +*** 7186,7192 **** + continue; + #endif + +! hgr_search_file(qi, fnames[fi], p_vc, p_regmatch); + } + FreeWild(fcount, fnames); + } +--- 7187,7193 ---- + continue; + #endif + +! hgr_search_file(qfl, fnames[fi], p_vc, p_regmatch); + } + FreeWild(fcount, fnames); + } +*************** +*** 7199,7205 **** + * specified language are found. + */ + static void +! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *lang) + { + char_u *p; + +--- 7200,7206 ---- + * specified language are found. + */ + static void +! hgr_search_in_rtp(qf_list_T *qfl, regmatch_T *p_regmatch, char_u *lang) + { + char_u *p; + +*************** +*** 7217,7223 **** + { + copy_option_part(&p, NameBuff, MAXPATHL, ","); + +! hgr_search_files_in_dir(qi, NameBuff, p_regmatch, &vc + #ifdef FEAT_MULTI_LANG + , lang + #endif +--- 7218,7224 ---- + { + copy_option_part(&p, NameBuff, MAXPATHL, ","); + +! hgr_search_files_in_dir(qfl, NameBuff, p_regmatch, &vc + #ifdef FEAT_MULTI_LANG + , lang + #endif +*************** +*** 7281,7292 **** + + // create a new quickfix list + qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep)); + +! hgr_search_in_rtp(qi, ®match, lang); + + vim_regfree(regmatch.regprog); + +- qfl = qf_get_curlist(qi); + qfl->qf_nonevalid = FALSE; + qfl->qf_ptr = qfl->qf_start; + qfl->qf_index = 1; +--- 7282,7293 ---- + + // create a new quickfix list + qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep)); ++ qfl = qf_get_curlist(qi); + +! hgr_search_in_rtp(qfl, ®match, lang); + + vim_regfree(regmatch.regprog); + + qfl->qf_nonevalid = FALSE; + qfl->qf_ptr = qfl->qf_start; + qfl->qf_index = 1; +*** ../vim-8.1.1035/src/version.c 2019-03-22 13:20:40.091897268 +0100 +--- src/version.c 2019-03-22 14:15:08.653809071 +0100 +*************** +*** 781,782 **** +--- 781,784 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 1036, + /**/ + +-- +From "know your smileys": + :-| :-| Deja' vu! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |