Skip to content

Commit

Permalink
fix(file): avoid plenary max results in filter, fixes #157
Browse files Browse the repository at this point in the history
  • Loading branch information
cseickel committed Mar 3, 2022
1 parent 0fd7201 commit 9b64591
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lua/neo-tree/sources/filesystem/lib/filter_external.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@ M.find_files = function(opts)
end
end

local maximum_results = limit or 100
if fd_supports_max_results then
maximum_results = nil
end
Job
:new({
command = cmd,
cwd = path,
args = args,
enable_recording = false,
maximum_results = limit or 100,
maximum_results = maximum_results,
on_stdout = function(err, line)
if opts.on_insert then
opts.on_insert(err, line)
Expand Down
4 changes: 2 additions & 2 deletions lua/neo-tree/sources/filesystem/lib/fs_scan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ M.get_items_async = function(state, parent_id, path_to_reveal, callback)
find_args = state.find_args,
find_by_full_path_words = state.find_by_full_path_words,
on_insert = function(err, path)
if err and #err > 0 then
log.error(err, path)
if err then
log.debug(err)
else
file_items.create_item(context, path)
end
Expand Down

0 comments on commit 9b64591

Please sign in to comment.