summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2021-08-20 11:11:24 -0400
committerGitHub <noreply@github.com>2021-08-20 11:11:24 -0400
commita97af306c4e9c9a6fa7c886c0ffe3079822c5203 (patch)
treef5e2b50a767e93618d0d8fdddb8a964c90633c8a /lua/telescope/actions/init.lua
parentd6d28dbe324de9826a579155076873888169ba0f (diff)
feat(performance): Major performance improvements using async v2 from @oberblastmeister (#987)
* start: Working w/ async jobs * short circuit to using bad finder if you pass writer.
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 6dc022e..43315cc 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -582,12 +582,22 @@ actions.git_staging_toggle = function(prompt_bufnr)
end
local entry_to_qf = function(entry)
+ local text = entry.text
+
+ if not text then
+ if type(entry.value) == "table" then
+ text = entry.value.text
+ else
+ text = entry.value
+ end
+ end
+
return {
bufnr = entry.bufnr,
filename = from_entry.path(entry, false),
lnum = entry.lnum,
col = entry.col,
- text = entry.text or entry.value.text or entry.value,
+ text = text,
}
end