From f8e2c67253484c72ea3aef290f50dcf638ca6857 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Fri, 13 Dec 2024 10:38:17 +1100 Subject: [PATCH] type safety for newly created vim.v.event type --- lua/nvim-tree/actions/root/change-dir.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-tree/actions/root/change-dir.lua b/lua/nvim-tree/actions/root/change-dir.lua index 0aa41612..f23f3c12 100644 --- a/lua/nvim-tree/actions/root/change-dir.lua +++ b/lua/nvim-tree/actions/root/change-dir.lua @@ -25,7 +25,7 @@ end ---@param new_tabpage integer ---@return boolean local function is_window_event(new_tabpage) - local is_event_scope_window = vim.v.event.scope == "window" or vim.v.event.changed_window + local is_event_scope_window = vim.v.event.scope == "window" or vim.v.event.changed_window or false return is_event_scope_window and new_tabpage == M.current_tab end