Allow TreeView file operation commands when focused (#1256)

Impacts `treeview:{rename,new-file,new-folder,open-in-system}`.
Previously those were only available when the mouse was over the 
`TreeView`.
They now use the same predicate as `treeview:delete`.
This commit is contained in:
Guldoman
2022-12-26 13:41:14 -04:00
committed by GitHub
parent 1446d95695
commit 18e3542be0
+1 -9
View File
@@ -714,16 +714,8 @@ command.add(
end
end
)
end
})
end,
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, {
["treeview:rename"] = function(item)
local old_filename = item.filename
local old_abs_filename = item.abs_filename