1
0
forked from aniani/vim

patch 8.2.4305: tex filetype detection fails

Problem:    Tex filetype detection fails.
Solution:   Check value to be positive. (closes #9704)
This commit is contained in:
Bram Moolenaar
2022-02-05 19:50:34 +00:00
parent 00eb99528e
commit e5b7897585
3 changed files with 25 additions and 3 deletions

View File

@@ -1306,4 +1306,23 @@ func Test_frm_file()
filetype off
endfunc
func Test_tex_file()
filetype on
" only tests one case, should do more
let lines =<< trim END
% This is a sentence.
This is a sentence.
END
call writefile(lines, "Xfile.tex")
split Xfile.tex
call assert_equal('plaintex', &filetype)
bwipe
call delete('Xfile.tex')
filetype off
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4305,
/**/
4304,
/**/