Change project files output to not include a prefix '/' in filename
It make sense to not put the initial '/' in the filename as the name is relative to the top directory it belongs to. By removing the the initial '/' in the filename we can re-introduce the variable core.project_files to stay compatible with standard Lite. The project_files variable will always point to the files table of the first entry of core.project_directories.
This commit is contained in:
@@ -75,8 +75,8 @@ command.add(nil, {
|
||||
local files = {}
|
||||
for dir, item in core.get_project_files() do
|
||||
if item.type == "file" then
|
||||
local filename = dir == core.project_dir and item.filename:match('^[/\\](.+)') or dir .. item.filename
|
||||
table.insert(files, common.home_encode(filename))
|
||||
local path = (dir == core.project_dir and "" or dir .. PATHSEP)
|
||||
table.insert(files, common.home_encode(path .. item.filename))
|
||||
end
|
||||
end
|
||||
core.command_view:enter("Open File From Project", function(text, item)
|
||||
|
||||
Reference in New Issue
Block a user