aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/filetype.lua2
-rw-r--r--runtime/lua/vim/filetype.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/filetype.lua b/runtime/filetype.lua
index 7728892c78..f1885a8b95 100644
--- a/runtime/filetype.lua
+++ b/runtime/filetype.lua
@@ -12,7 +12,7 @@ vim.api.nvim_create_augroup('filetypedetect', { clear = false })
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
group = 'filetypedetect',
callback = function(args)
- local ft, on_detect = vim.filetype.match({ buf = args.buf })
+ local ft, on_detect = vim.filetype.match({ filename = args.match, buf = args.buf })
if not ft then
-- Generic configuration file used as fallback
ft = require('vim.filetype.detect').conf(args.file, args.buf)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index de79d65f48..df21fd46a1 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -2408,7 +2408,7 @@ function M.match(args)
local ft, on_detect
-- First check for the simple case where the full path exists as a key
- local path = vim.fn.resolve(vim.fn.fnamemodify(name, ':p'))
+ local path = vim.fn.fnamemodify(name, ':p')
ft, on_detect = dispatch(filename[path], path, bufnr)
if ft then
return ft, on_detect