From 2bd71dda8804adfeb632c2a53c15023ffffe7cbf Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Fri, 19 Apr 2024 10:44:16 -0400 Subject: [PATCH] lint: fix typechecking --- lua/oil/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/oil/init.lua b/lua/oil/init.lua index f68eb5f..30215b6 100644 --- a/lua/oil/init.lua +++ b/lua/oil/init.lua @@ -632,13 +632,14 @@ M.select = function(opts, callback) cmd = "buffer" end end + ---@diagnostic disable-next-line: param-type-mismatch local ok, err = pcall(vim.cmd, { cmd = cmd, args = { filebufnr }, mods = mods, }) -- Ignore swapfile errors - if not ok and not err:match("^Vim:E325:") then + if not ok and err and not err:match("^Vim:E325:") then vim.api.nvim_echo({ { err, "Error" } }, true, {}) end