vim modeline regex should accept not one but "at least one" whitespace.

This commit is contained in:
Nicholas Ochiel 2017-10-21 21:00:56 +03:00
parent 6740e3cc0c
commit d168c75002

View File

@ -96,7 +96,7 @@ def -hidden modeline-parse-impl %{
def modeline-parse -docstring "Read and interpret vi-format modelines at the beginning/end of the buffer" %{
try %{ eval -draft %{
exec \%s\`|.\'<ret> %opt{modelines}k <a-x> %opt{modelines}X \
s^[^\s]*?\s(vim?|kak(oune)?):\s?[^\n]+<ret> <a-x>
s^\S*?\s+?(vim?|kak(oune)?):\s?[^\n]+<ret> <a-x>
eval -draft -itersel modeline-parse-impl
} }
}