vim-patch:9.0.0771: cannot always tell the difference beween tex and … (#20687)

vim-patch:9.0.0771: cannot always tell the difference beween tex and rexx files

Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes vim/vim#11380)
bd053f894b
This commit is contained in:
Jonas Strittmatter
2022-10-17 08:18:57 +02:00
committed by GitHub
parent 8617101b6b
commit d44f088834
3 changed files with 7 additions and 2 deletions

View File

@@ -181,7 +181,7 @@ function M.cls(bufnr)
return vim.g.filetype_cls
end
local line = getlines(bufnr, 1)
if line:find('^%%') then
if line:find('^[%%\\]') then
return 'tex'
elseif line:find('^#') and line:lower():find('rexx') then
return 'rexx'