summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorigna_martinoli <ignamartinoli@protonmail.com>2024-07-12 07:32:21 +0200
committerChristian Brabandt <cb@256bit.org>2024-07-12 07:33:32 +0200
commit7347642633eb2de23a78c51a4388c9080440eec4 (patch)
treed1220e28d2b6da8ba99fe8e8d07c54d49ae761f7
parent1ee7420460768df67ea4bc73467f2d4f8b1555bd (diff)
runtime(filetype): Fix Prolog file detection regex
Problem: filetype: .pro file detection for Prolog is broken Solution: fixed the regex to only match on the tested cases (igna_martinoli) fixes: #10835 closes: #15206 Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/autoload/dist/ft.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 6aea180c54..fc844383ed 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -465,7 +465,7 @@ export def ProtoCheck(default: string)
# recognize Prolog by specific text in the first non-empty line
# require a blank after the '%' because Perl uses "%list" and "%translate"
var lnum = getline(nextnonblank(1))
- if lnum =~ '\<prolog\>' || lnum =~ '(^\s*(:-\|%\|\/\*))\|.\s*$'
+ if lnum =~ '\<prolog\>' || lnum =~ '^\(:-\|%\|\/\*\)\|\.$'
setf prolog
else
exe 'setf ' .. default