# HG changeset patch # User Christian Brabandt # Date 1498136403 -7200 # Node ID f7a0b0b1fc17ec12715b933d105c271876ec3040 # Parent c332861b9a4530e1c10a488131920e369bd6a00c patch 8.0.0650: for extra help files the filetype is set more than once commit https://github.com/vim/vim/commit/868831f1224cfc17a4de21fb7386873254592308 Author: Bram Moolenaar Date: Thu Jun 22 14:47:22 2017 +0200 patch 8.0.0650: for extra help files the filetype is set more than once Problem: For extra help files the filetype is set more than once. Solution: In *.txt files check that there is no help file modline. diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2017 Jun 20 +" Last Change: 2017 Jun 22 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2789,7 +2789,13 @@ au BufNewFile,BufRead zsh*,zlog* call s " Plain text files, needs to be far down to not override others. This avoids " the "conf" type being used if there is a line starting with '#'. -au BufNewFile,BufRead *.txt,*.text,README setf text +au BufNewFile,BufRead *.text,README setf text + +" Help files match *.txt but should have a last line that is a modeline. +au BufNewFile,BufRead *.txt + \ if getline('$') !~ 'vim:.*ft=help' + \| setf text + \| endif " Use the filetype detect plugins. They may overrule any of the previously diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 650, +/**/ 649, /**/ 648,