refactor(#2826): more consistency checking

This commit is contained in:
Alexander Courtis
2025-06-20 12:36:09 +10:00
parent d72f85f524
commit 4d6c42356a
6 changed files with 8 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ function M.fn(opts)
end
local explorer = core.get_explorer()
if explorer and explorer.view:is_visible() then
if explorer and explorer.view:is_visible(nil, "tree/find-file.fn") then
-- focus
if opts.focus then
lib.set_target_win()

View File

@@ -25,7 +25,7 @@ function M.fn(opts)
local explorer = core.get_explorer()
if explorer and explorer.view:is_visible() then
if explorer and explorer.view:is_visible(nil, "open.fn") then
-- focus
lib.set_target_win()
explorer.view:focus()

View File

@@ -42,7 +42,7 @@ function M.fn(opts, no_focus, cwd, bang)
opts.path = nil
end
if explorer and explorer.view:is_visible() then
if explorer and explorer.view:is_visible(nil, "toggle.fn") then
-- close
explorer.view:close(nil, "toggle.fn")
else