From 718ab209f5a4aef64ddf1c2696a36fa2c9233af1 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sun, 28 Nov 2021 07:16:53 +0100 Subject: [PATCH] Check the entire path in `TreeView` predicate --- data/plugins/treeview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index 8edee393..7adae8a9 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -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" },