From c25f83da901398a2d71d1331256d8147f38463d4 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sun, 21 Aug 2022 20:03:32 +0200 Subject: [PATCH] Make predicate for some `TreeView` commands stricter This avoids performing the `treeview:new-folder` command on ctrl + double click. This happens because `ctrl+lclick` (which is the keybinding for `treeview:new-folder`) is triggered also by ctrl + double click, which isn't captured by anything else. --- data/plugins/treeview.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index d3a7cf79..89912541 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -733,6 +733,8 @@ command.add( command.add(function() + if not (core.root_view.overlapping_node and core.root_view.overlapping_node.active_view) then return end + if core.root_view.overlapping_node.active_view ~= view then return end local item = treeitem() return item ~= nil, item end, {