From f0cc973e382acd1714ef5855923dd036a7090aa4 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Sun, 20 Mar 2022 00:53:13 -0400 Subject: [PATCH] treeview: also handle focus change from mouse and then commandview --- data/plugins/treeview.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index 4a8fc0d3..b8f5dda3 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -581,7 +581,9 @@ command.add(nil, { end else - core.set_active_view(previous_view) + local last_active = not core.last_active_view:is(CommandView) + and core.last_active_view or core.root_view:get_primary_node().views[1] + core.set_active_view(previous_view or last_active) end end })