diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-07-07 22:38:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-07 22:38:28 +0200 |
| commit | 524c4eb7fb1a9941460ab7c7c09a3bca9cebb7be (patch) | |
| tree | dbc42bf2f8eb8361b229c287667674ddd8ef7fa2 | |
| parent | 7df6662394e12cb65593f69b9d6fc0b4d35f3a00 (diff) | |
fix: more autocmds desc fixes (#2049)
| -rw-r--r-- | lua/telescope/make_entry.lua | 5 |
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, |
