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:
@@ -274,6 +274,7 @@ function core.load_user_directory()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
function core.add_project_directory(path)
|
||||
-- top directories has a file-like "item" but the item.filename
|
||||
-- will be simply the name of the directory, without its path.
|
||||
@@ -285,6 +286,18 @@ function core.add_project_directory(path)
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
function core.remove_project_directory(path)
|
||||
for i, dir in ipairs(core.project_directories) do
|
||||
if dir.name == path then
|
||||
table.remove(core.project_directories, i)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function core.init()
|
||||
command = require "core.command"
|
||||
keymap = require "core.keymap"
|
||||
|
||||
Reference in New Issue
Block a user