Check the entire path in `TreeView` predicate
This commit is contained in:
parent
b8bda8006b
commit
718ab209f5
|
@ -446,7 +446,7 @@ function RootView:draw(...)
|
|||
end
|
||||
|
||||
local function is_project_folder(path)
|
||||
return common.basename(core.project_dir) == path
|
||||
return core.project_dir == path
|
||||
end
|
||||
|
||||
menu:register(function() return view.hovered_item end, {
|
||||
|
@ -457,7 +457,7 @@ menu:register(function() return view.hovered_item end, {
|
|||
menu:register(
|
||||
function()
|
||||
return view.hovered_item
|
||||
and not is_project_folder(view.hovered_item.filename)
|
||||
and not is_project_folder(view.hovered_item.abs_filename)
|
||||
end,
|
||||
{
|
||||
{ text = "Rename", command = "treeview:rename" },
|
||||
|
|
Loading…
Reference in New Issue