Problem: Some "gomod" files are not recognized.
Solution: Check for "go.mod" file name before checking out the contents.
(Omar El Halabi, closes #12462)
export def FTmod()
if exists("g:filetype_mod")
exe "setf " .. g:filetype_mod
+ elseif expand("<afile>") =~ '\<go.mod$'
+ setf gomod
elseif IsLProlog()
setf lprolog
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
setf modula2
elseif IsRapid()
setf rapid
- elseif expand("<afile>") =~ '\<go.mod$'
- setf gomod
else
# Nothing recognized, assume modsim3
setf modsim3
bwipe!
call delete('go.mod')
+ call writefile(['module M'], 'go.mod')
+ split go.mod
+ call assert_equal('gomod', &filetype)
+ bwipe!
+ call delete('go.mod')
+
filetype off
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1591,
/**/
1590,
/**/