Add command to remove a directory from the project

In addition directories can be removed with a mouse middle-click in the
tree view pane.
This commit is contained in:
Francesco Abbate
2020-12-28 15:51:16 +01:00
parent c042bfc907
commit ddd56ec615
4 changed files with 48 additions and 3 deletions
+12
View File
@@ -117,6 +117,18 @@ function common.dir_path_suggest(text)
end
function common.dir_list_suggest(text, dir_list)
local path, name = text:match("^(.-)([^/\\]*)$")
local res = {}
for _, dir_path in ipairs(dir_list) do
if dir_path:lower():find(text:lower(), nil, true) == 1 then
table.insert(res, dir_path)
end
end
return res
end
function common.match_pattern(text, pattern, ...)
if type(pattern) == "string" then
return text:find(pattern, ...)