From f9683f28236599a7082f43304a9685fad8ee8e00 Mon Sep 17 00:00:00 2001 From: smjonas Date: Wed, 6 Jul 2022 16:25:51 +0200 Subject: fix(filetype): remove call to vim.fn.resolve and pass filename to match function For example on MacOS, /etc/hostname.file is symlinked to /private/etc/hostname.file. We only care about the original file path though. --- runtime/lua/vim/filetype.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua') 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 -- cgit