From 82b3b4c6cf2973fe767f8e2311482af0bd95267e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Dec 2021 19:19:08 +0000 Subject: patch 8.2.3873: go.mod files are not recognized Problem: go.mod files are not recognized. Solution: Check for the file name. (closes #9380) --- runtime/filetype.vim | 4 +++- src/testdir/test_filetype.vim | 1 + src/version.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 7740d8faa..bd1d2e905 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1091,7 +1091,9 @@ au BufNewFile,BufRead *.mmp setf mmp " Modsim III (or LambdaProlog) au BufNewFile,BufRead *.mod - \ if getline(1) =~ '\' | + \ if expand("") =~ '\' | \ setf lprolog | \ else | \ setf modsim3 | diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index cd82e3814..719d690e8 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -204,6 +204,7 @@ let s:filename_checks = { \ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'], \ 'gnuplot': ['file.gpi'], \ 'go': ['file.go'], + \ 'gomod': ['go.mod'], \ 'gp': ['file.gp', '.gprc'], \ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'], \ 'grads': ['file.gs'], diff --git a/src/version.c b/src/version.c index 7a1fd69ed..53d3b57e1 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3873, /**/ 3872, /**/ -- cgit v1.2.1