diff options
Diffstat (limited to 'data/vim/patches/8.1.1017')
-rw-r--r-- | data/vim/patches/8.1.1017 | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.1017 b/data/vim/patches/8.1.1017 new file mode 100644 index 000000000..dbe34952c --- /dev/null +++ b/data/vim/patches/8.1.1017 @@ -0,0 +1,132 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.1017 +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.1017 +Problem: Off-by-one error in filetype detection. +Solution: Also check the last line of the file. +Files: runtime/autoload/dist/ft.vim + + +*** ../vim-8.1.1016/runtime/autoload/dist/ft.vim 2019-01-18 21:45:14.593232311 +0100 +--- runtime/autoload/dist/ft.vim 2019-03-08 07:47:10.095812063 +0100 +*************** +*** 197,203 **** + exe 'setf ' . g:filetype_euphoria + else + let n = 1 +! while n < 100 && n < line("$") + if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" + setf specman + return +--- 197,203 ---- + exe 'setf ' . g:filetype_euphoria + else + let n = 1 +! while n < 100 && n <= line("$") + if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" + setf specman + return +*************** +*** 211,217 **** + " Distinguish between HTML, XHTML and Django + func dist#ft#FThtml() + let n = 1 +! while n < 10 && n < line("$") + if getline(n) =~ '\<DTD\s\+XHTML\s' + setf xhtml + return +--- 211,217 ---- + " Distinguish between HTML, XHTML and Django + func dist#ft#FThtml() + let n = 1 +! while n < 10 && n <= line("$") + if getline(n) =~ '\<DTD\s\+XHTML\s' + setf xhtml + return +*************** +*** 222,234 **** + endif + let n = n + 1 + endwhile +! setf html + endfunc + + " Distinguish between standard IDL and MS-IDL + func dist#ft#FTidl() + let n = 1 +! while n < 50 && n < line("$") + if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' + setf msidl + return +--- 222,234 ---- + endif + let n = n + 1 + endwhile +! setf FALLBACK html + endfunc + + " Distinguish between standard IDL and MS-IDL + func dist#ft#FTidl() + let n = 1 +! while n < 50 && n <= line("$") + if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' + setf msidl + return +*************** +*** 699,705 **** + + func dist#ft#FTxml() + let n = 1 +! while n < 100 && n < line("$") + let line = getline(n) + " DocBook 4 or DocBook 5. + let is_docbook4 = line =~ '<!DOCTYPE.*DocBook' +--- 699,705 ---- + + func dist#ft#FTxml() + let n = 1 +! while n < 100 && n <= line("$") + let line = getline(n) + " DocBook 4 or DocBook 5. + let is_docbook4 = line =~ '<!DOCTYPE.*DocBook' +*************** +*** 725,731 **** + + func dist#ft#FTy() + let n = 1 +! while n < 100 && n < line("$") + let line = getline(n) + if line =~ '^\s*%' + setf yacc +--- 725,731 ---- + + func dist#ft#FTy() + let n = 1 +! while n < 100 && n <= line("$") + let line = getline(n) + if line =~ '^\s*%' + setf yacc +*** ../vim-8.1.1016/src/version.c 2019-03-17 16:59:38.582201903 +0100 +--- src/version.c 2019-03-17 17:15:09.505371214 +0100 +*************** +*** 781,782 **** +--- 781,784 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 1017, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +82. AT&T names you Customer of the Month for the third consecutive time. + + /// 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 /// |