summaryrefslogtreecommitdiff
path: root/lua/telescope
diff options
context:
space:
mode:
authorfdschmidt93 <39233597+fdschmidt93@users.noreply.github.com>2021-12-03 15:36:48 +0100
committerGitHub <noreply@github.com>2021-12-03 15:36:48 +0100
commit9d7d322f855aa1217b1bb303aafb1127bf7db470 (patch)
tree9426abc31f62e577f3d8e7af3d3f104ac7704a51 /lua/telescope
parent0c819d66059d95d673916b93a80163ce18bd785a (diff)
feat: allow initial results in async_oneshot_finder (#1461)
Diffstat (limited to 'lua/telescope')
-rw-r--r--lua/telescope/finders/async_oneshot_finder.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/finders/async_oneshot_finder.lua b/lua/telescope/finders/async_oneshot_finder.lua
index c75c685..067cb3a 100644
--- a/lua/telescope/finders/async_oneshot_finder.lua
+++ b/lua/telescope/finders/async_oneshot_finder.lua
@@ -13,8 +13,8 @@ return function(opts)
local cwd = opts.cwd
local fn_command = assert(opts.fn_command, "Must pass `fn_command`")
- local results = {}
- local num_results = 0
+ local results = vim.F.if_nil(opts.results, {})
+ local num_results = #results
local job_started = false
local job_completed = false