To: vim-dev@vim.org Subject: Patch 6.3a.005 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3a.005 Problem: ":checkpath!" does not use 'includeexpr'. Solution: Use a file name that was found directly. When a file was not found and the located name is empty, use the rest of the line. Files: src/search.c *** ../vim-6.3a.004/src/search.c Fri May 7 10:59:39 2004 --- src/search.c Sat May 8 21:50:54 2004 *************** *** 3794,3819 **** { for (i = 0; i <= depth_displayed; i++) MSG_PUTS(" "); ! /* ! * Isolate the file name. ! * Include the surrounding "" or <> if present. ! */ ! for (p = incl_regmatch.endp[0] + 1; !vim_isfilec(*p); p++) ! ; ! for (i = 0; vim_isfilec(p[i]); i++) ! ; ! if (p[-1] == '"' || p[-1] == '<') { ! --p; ! ++i; } ! if (p[i] == '"' || p[i] == '>') ! ++i; ! save_char = p[i]; ! p[i] = NUL; ! /* Same highlighting as for directories */ ! msg_outtrans_attr(p, hl_attr(HLF_D)); ! p[i] = save_char; if (new_fname == NULL && action == ACTION_SHOW_ALL) { if (already_searched) --- 3794,3837 ---- { for (i = 0; i <= depth_displayed; i++) MSG_PUTS(" "); ! if (new_fname != NULL) { ! /* using "new_fname" is more reliable, e.g., when ! * 'includeexpr' is set. */ ! msg_outtrans_attr(new_fname, hl_attr(HLF_D)); } ! else ! { ! /* ! * Isolate the file name. ! * Include the surrounding "" or <> if present. ! */ ! for (p = incl_regmatch.endp[0]; !vim_isfilec(*p); p++) ! ; ! for (i = 0; vim_isfilec(p[i]); i++) ! ; ! if (i == 0) ! { ! /* Nothing found, use the rest of the line. */ ! p = incl_regmatch.endp[0]; ! i = STRLEN(p); ! } ! else ! { ! if (p[-1] == '"' || p[-1] == '<') ! { ! --p; ! ++i; ! } ! if (p[i] == '"' || p[i] == '>') ! ++i; ! } ! save_char = p[i]; ! p[i] = NUL; ! msg_outtrans_attr(p, hl_attr(HLF_D)); ! p[i] = save_char; ! } ! if (new_fname == NULL && action == ACTION_SHOW_ALL) { if (already_searched) *** ../vim-6.3a.004/src/version.c Sat May 8 16:45:27 2004 --- src/version.c Sat May 8 21:51:52 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 5, /**/ -- hundred-and-one symptoms of being an internet addict: 195. Your cat has its own home page. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///