To: vim-dev@vim.org Subject: Patch 6.3b.004 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3b.004 Problem: ":helpgrep" includes a trailing CR in the text line. Solution: Remove the CR. Files: src/quickfix.c *** ../vim-6.3b.003/src/quickfix.c Sun May 16 22:38:45 2004 --- src/quickfix.c Tue May 25 18:04:34 2004 *************** *** 2179,2184 **** --- 2179,2191 ---- while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int) { if (vim_regexec(®match, IObuff, (colnr_T)0)) + { + int l = STRLEN(IObuff); + + /* remove trailing CR, LF, spaces, etc. */ + while (l > 0 && IObuff[l - 1] <= ' ') + IObuff[--l] = NUL; + if (qf_add_entry(&prevp, NULL, /* dir */ fnames[fi], *************** *** 2194,2199 **** --- 2201,2207 ---- got_int = TRUE; break; } + } ++lnum; line_breakcheck(); } *** ../vim-6.3b.003/src/version.c Tue May 25 17:47:36 2004 --- src/version.c Tue May 25 18:10:19 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 4, /**/ -- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth /// 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 ///