diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-02-06 12:09:16 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2022-02-06 12:10:09 +0100 |
commit | 05f38bbede99ea0223550554bcfb9ab43d036d1f (patch) | |
tree | 25d4a39a25aa0bc38efec9b65579e2562f3b1990 /src | |
parent | 8215c05945054755b2c3cadae198894372dbfe0f (diff) | |
download | rneovim-05f38bbede99ea0223550554bcfb9ab43d036d1f.tar.gz rneovim-05f38bbede99ea0223550554bcfb9ab43d036d1f.tar.bz2 rneovim-05f38bbede99ea0223550554bcfb9ab43d036d1f.zip |
vim-patch:8.2.4305: tex filetype detection fails
Problem: Tex filetype detection fails.
Solution: Check value to be positive. (closes vim/vim#9704)
https://github.com/vim/vim/commit/e5b7897585eccec84431d8b23df5cde2e283828c
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index d4e5563865..713875b9d6 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -1277,4 +1277,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 |