runtime(filetype): Fix Prolog file detection regex

Commit: 
https://github.com/vim/vim/commit/7347642633eb2de23a78c51a4388c9080440eec4
Author: igna_martinoli <ignamartin...@protonmail.com>
Date:   Fri Jul 12 07:32:21 2024 +0200

    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 <ignamartin...@protonmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 6aea180c5..fc844383e 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sS95i-001H6H-Cg%40256bit.org.

Raspunde prin e-mail lui