aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index efde69c8f4..c3e540a4ae 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -2654,10 +2654,10 @@ vim.filetype.add({filetypes}) *vim.filetype.add()*
['.*'] = {
priority = -math.huge,
function(path, bufnr)
- local content = vim.filetype.getlines(bufnr, 1)
- if vim.filetype.matchregex(content, [[^#!.*\<mine\>]]) then
+ local content = vim.api.nvim_buf_get_lines(bufnr, 0, 1, false)[1] or ''
+ if vim.regex([[^#!.*\<mine\>]]):match_str(content) ~= nil then
return 'mine'
- elseif vim.filetype.matchregex(content, [[\<drawing\>]]) then
+ elseif vim.regex([[\<drawing\>]]):match_str(content) ~= nil then
return 'drawing'
end
end,