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.
This commit is contained in:
Guldoman 2022-08-21 20:03:32 +02:00
parent cbe0fd63bf
commit c25f83da90
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 2 additions and 0 deletions

View File

@ -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, {