From 6921cd06ac7b530d786b2282afdfce67762008f1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 20:22:04 +0100 Subject: [PATCH] fix(explorer): don't try to show when closed. Fixes #836 --- lua/snacks/picker/source/explorer.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/snacks/picker/source/explorer.lua b/lua/snacks/picker/source/explorer.lua index d140cfa2..bf8e2ef1 100644 --- a/lua/snacks/picker/source/explorer.lua +++ b/lua/snacks/picker/source/explorer.lua @@ -86,6 +86,10 @@ function State:show(path) return end local function show() + local picker = self.picker() + if not picker or picker.closed then + return + end for item, idx in picker:iter() do if item.file == path then picker.list:view(idx)