patch 9.1.1286: filetype: help files not detected when 'iskeyword' includes ":"

Problem:  Help files not detected when 'iskeyword' includes ":".
Solution: Do not use \< and \> in the pattern (zeertzjq).

fixes: #17069
closes: #17071

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-04-07 21:14:41 +02:00
committed by Christian Brabandt
parent 5ce1e4ad4a
commit e370141bf4
3 changed files with 25 additions and 7 deletions

View File

@ -53,7 +53,7 @@ endfunc
" Vim help file, set ft explicitly, because 'modeline' might be off
au BufNewFile,BufRead */doc/*.txt
\ if getline('$') =~ '\(^\|\s\)vim:.*\<\(ft\|filetype\)=help\>'
\ if getline('$') =~ '\%(^\|\s\)vim:\%(.*\%(:\|\s\)\)\?\%(ft\|filetype\)=help\%(:\|\s\|$\)'
\| setf help
\| endif