Skip to content

Commit 7993e6d

Browse files
authored
fix(utils): avoid vim.filetype.match in fast event (CopilotC-Nvim#1344)
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
1 parent 28e13a3 commit 7993e6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/CopilotChat/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function M.filetype(filename)
219219
fs_access = false,
220220
})
221221

222-
if ft == '' or not ft then
222+
if ft == '' or not ft and not vim.in_fast_event() then
223223
return vim.filetype.match({ filename = filename })
224224
end
225225

0 commit comments

Comments
 (0)