Implement lazy loading of directories
When the number of files in a project directory is above the max limit switch back to a mechanism to read directory content only when the corresponding folder is expanded in the treeview. When the command core:find-file is invoked the command core:open-file is executed instead because the complete list of the project's files is not available. When a project search is done we search through all the files within the project dir without indexing them. Address issues #217 #203 #183.
This commit is contained in:
@@ -66,6 +66,9 @@ command.add(nil, {
|
||||
end,
|
||||
|
||||
["core:find-file"] = function()
|
||||
if core.project_files_limit then
|
||||
return command.perform "core:open-file"
|
||||
end
|
||||
local files = {}
|
||||
for dir, item in core.get_project_files() do
|
||||
if item.type == "file" then
|
||||
|
||||
Reference in New Issue
Block a user