To: vim-dev@vim.org Subject: Patch 6.1.034 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.034 Problem: A CVS diff file isn't recognized as diff filetype. Solution: Skip lines starting with "? " before checking for an "Index:" line. Files: runtime/scripts.vim *** ../vim61.033/runtime/scripts.vim Tue Apr 23 21:22:42 2002 --- runtime/scripts.vim Sun Apr 14 13:30:29 2002 *************** *** 254,259 **** --- 254,274 ---- elseif s:line1 =~ '|\*\{1,80}' && s:line2 =~ 'VRC ' \ || s:line2 =~ '|\*\{1,80}' && s:line3 =~ 'VRC ' set ft=baan + + " Valgrind + elseif s:line1 =~ '^==\d\+== valgrind' + set ft=valgrind + + " CVS diff + else + let lnum = 1 + while getline(lnum) =~ "^? " && lnum < line("$") + let lnum = lnum + 1 + endwhile + if getline(lnum) =~ '^Index:\s\+\f\+$' + set ft=diff + endif + endif unlet s:line2 s:line3 s:line4 s:line5 *** ../vim61.033/src/version.c Sun Apr 28 22:00:14 2002 --- src/version.c Sun Apr 28 22:02:39 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 34, /**/ -- ARTHUR: Be quiet! DENNIS: Well you can't expect to wield supreme executive power just 'cause some watery tart threw a sword at you! ARTHUR: Shut up! DENNIS: I mean, if I went around sayin' I was an empereror just because some moistened bint had lobbed a scimitar at me they'd put me away! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///