patch 8.2.4464: Dtrace files are recognized as filetype D

Problem:    Dtrace files are recognized as filetype D.
Solution:   Add a pattern for Dtrace files. (Teubel György, closes #9841)
            Add some more testing.
This commit is contained in:
=?UTF-8?q?Teubel=20Gy=C3=B6rgy?=
2022-02-24 17:59:09 +00:00
committed by Bram Moolenaar
parent 38b85cb4d7
commit 4d56b971cb
4 changed files with 45 additions and 0 deletions

View File

@ -206,6 +206,10 @@ export def EuphoriaCheck()
enddef
export def DtraceCheck()
if did_filetype()
# Filetype was already detected
return
endif
var lines = getline(1, min([line("$"), 100]))
if match(lines, '^module\>\|^import\>') > -1
# D files often start with a module and/or import statement.