vim-patch:partial: 48c3f4e0bff7 (#19684)

vim-patch:partial:48c3f4e0bff7

Update runtime files
48c3f4e0bf

partially skip `options.txt` (needs 9.0.0138)
This commit is contained in:
Christian Clason
2022-08-09 10:43:28 +02:00
committed by GitHub
parent e6680ea7c3
commit a5e846b996
15 changed files with 455 additions and 181 deletions

View File

@@ -930,7 +930,7 @@ function M.progress_pascal(bufnr)
return 'progress'
end
-- Distinguish between "default" and Cproto prototype file.
-- Distinguish between "default", Prolog and Cproto prototype file.
function M.proto(bufnr, default)
-- Cproto files have a comment in the first line and a function prototype in
-- the second line, it always ends in ";". Indent files may also have
@@ -940,7 +940,18 @@ function M.proto(bufnr, default)
if getlines(bufnr, 2):find('.;$') then
return 'cpp'
else
return default
-- Recognize Prolog by specific text in the first non-empty line;
-- require a blank after the '%' because Perl uses "%list" and "%translate"
local line = nextnonblank(bufnr, 1)
if
line and line:find(':%-')
or matchregex(line, [[\c\<prolog\>]])
or findany(line, { '^%s*%%+%s', '^%s*%%+$', '^%s*/%*' })
then
return 'prolog'
else
return default
end
end
end