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:
parent
1446d95695
commit
18e3542be0
|
@ -714,16 +714,8 @@ command.add(
|
||||||
end
|
end
|
||||||
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)
|
["treeview:rename"] = function(item)
|
||||||
local old_filename = item.filename
|
local old_filename = item.filename
|
||||||
local old_abs_filename = item.abs_filename
|
local old_abs_filename = item.abs_filename
|
||||||
|
|
Loading…
Reference in New Issue