Skip to content

Commit d9bbeee

Browse files
committed
fixup: got em
1 parent c0a3b81 commit d9bbeee

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lua/telescope/builtin/files.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ end
211211
files.file_browser = function(opts)
212212
opts = opts or {}
213213

214+
opts.depth = opts.depth or 1
214215
opts.cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.loop.cwd()
215216
opts.new_finder = opts.new_finder or function(path)
216217
opts.cwd = path
@@ -219,7 +220,7 @@ files.file_browser = function(opts)
219220
scan.scan_dir(path, {
220221
hidden = opts.hidden or false,
221222
add_dirs = true,
222-
depth = 1,
223+
depth = opts.depth,
223224
on_insert = function(entry, typ)
224225
table.insert(data, typ == 'directory' and (entry .. os_sep) or entry)
225226
end

lua/telescope/pickers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ function Picker:refresh(finder, opts)
637637
if opts.reset_prompt then self:reset_prompt() end
638638

639639
self.finder:close()
640-
self.finder = finder
640+
if finder then self.finder = finder end
641641

642642
-- TODO: Need to do on_lines
643643
self.__on_lines(nil, nil, nil, 0, 1)

0 commit comments

Comments
 (0)