diff --git a/lua/neo-tree/sources/common/hijack_cursor.lua b/lua/neo-tree/sources/common/hijack_cursor.lua index 55d82fcd..1a040318 100644 --- a/lua/neo-tree/sources/common/hijack_cursor.lua +++ b/lua/neo-tree/sources/common/hijack_cursor.lua @@ -20,7 +20,7 @@ local hijack_cursor_handler = function() end local state = manager.get_state(source, nil, winid) - if state == nil then + if state == nil or not state.tree then return end local node = state.tree:get_node()