summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authordkearns <dougkearns@gmail.com>2024-02-20 06:58:30 +1100
committerGitHub <noreply@github.com>2024-02-19 20:58:30 +0100
commitef387c062bb1966187d3f307d697d80162051a0d (patch)
tree8743a85496d9ec2222aff0b5814be8a7e6c7b614 /runtime
parent72a1f45e9324f7e3b668b25cb18d2499df94720e (diff)
runtime(filetype): Modula-2 files with priority not detected (#14055)
Problem: Modula-2 files with a specified priority are not detected. Solution: Match the priority syntax in module header lines when performing heuristic content detection. Disable the :defcompile debug line. This was accidentally left enabled in commit 68a8947. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/dist/ft.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 9d0f2ee7af..14628308ee 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
-# Last Change: 2024 Jan 05
+# Last Change: 2024 Feb 18
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -531,7 +531,7 @@ def IsLProlog(): bool
enddef
def IsModula2(): bool
- return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*;\|^\s*(\*'
+ return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*\%(\[.*]\s*\)\=;\|^\s*(\*'
enddef
def SetFiletypeModula2()
@@ -1293,4 +1293,4 @@ export def FTvba()
enddef
# Uncomment this line to check for compilation errors early
-defcompile
+# defcompile