summaryrefslogtreecommitdiff
path: root/lua/telescope/make_entry.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2022-07-07 22:38:28 +0200
committerGitHub <noreply@github.com>2022-07-07 22:38:28 +0200
commit524c4eb7fb1a9941460ab7c7c09a3bca9cebb7be (patch)
treedbc42bf2f8eb8361b229c287667674ddd8ef7fa2 /lua/telescope/make_entry.lua
parent7df6662394e12cb65593f69b9d6fc0b4d35f3a00 (diff)
fix: more autocmds desc fixes (#2049)
Diffstat (limited to 'lua/telescope/make_entry.lua')
-rw-r--r--lua/telescope/make_entry.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua
index b567237..7f2484b 100644
--- a/lua/telescope/make_entry.lua
+++ b/lua/telescope/make_entry.lua
@@ -1178,9 +1178,12 @@ function make_entry.gen_from_autocommands(opts)
return function(entry)
local group_name = vim.F.if_nil(entry.group_name, "<anonymous>")
local command = entry.command
- if entry.desc and vim.startswith(command, "<lua: ") then
+ if entry.desc and (entry.callback or vim.startswith(command, "<lua: ")) then
command = entry.desc
end
+ if command == nil or command == "" then
+ command = "<lua function>"
+ end
return make_entry.set_default_entry_mt({
value = {
event = entry.event,