forked from aniani/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 #11380)
This commit is contained in:
parent
d8cd6f7427
commit
bd053f894b
2
runtime/autoload/dist/ft.vim
vendored
2
runtime/autoload/dist/ft.vim
vendored
@ -145,7 +145,7 @@ export def FTcls()
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) =~ '^%'
|
||||
if getline(1) =~ '^\v%(\%|\\)'
|
||||
setf tex
|
||||
elseif getline(1)[0] == '#' && getline(1) =~ 'rexx'
|
||||
setf rexx
|
||||
|
@ -1741,6 +1741,11 @@ func Test_cls_file()
|
||||
call assert_equal('tex', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['\NeedsTeXFormat{LaTeX2e}'], 'Xfile.cls')
|
||||
split Xfile.cls
|
||||
call assert_equal('tex', &filetype)
|
||||
bwipe!
|
||||
|
||||
" Rexx
|
||||
|
||||
call writefile(['# rexx'], 'Xfile.cls')
|
||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
771,
|
||||
/**/
|
||||
770,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user