Skip to content

Commit 8c428b2

Browse files
authored
Make folder browser respect depth when using fd
1 parent 7bf55ed commit 8c428b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/telescope/_extensions/file_browser/finders.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ local function fd_file_args(opts)
5151
table.insert(args, "--type")
5252
table.insert(args, "directory")
5353
end
54-
if type(opts.depth) == "number" then
55-
table.insert(args, "--maxdepth")
56-
table.insert(args, opts.depth)
57-
end
5854
else
5955
args = { "--type", "directory", "--absolute-path" }
6056
end
6157

58+
if type(opts.depth) == "number" then
59+
table.insert(args, "--maxdepth")
60+
table.insert(args, opts.depth)
61+
end
6262
if hidden_opts(opts) then
6363
table.insert(args, "--hidden")
6464
end

0 commit comments

Comments
 (0)