diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-04-25 22:28:58 +0200 |
|---|---|---|
| committer | Simon Hauser <Simon-Hauser@outlook.de> | 2022-04-25 22:29:53 +0200 |
| commit | fd9e1e1674c5ae980bc742f773fb78ca80cf8970 (patch) | |
| tree | 692f6a96163802ad40e6742655f91175b67d82ff | |
| parent | fce74f509dccac97b976bc5cdf0c8fee2e1d633b (diff) | |
fix(help_tags): exclude invalid help-tag that errors
fix #1858
| -rw-r--r-- | lua/telescope/builtin/internal.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua index e3bcdce..9f0e1e9 100644 --- a/lua/telescope/builtin/internal.lua +++ b/lua/telescope/builtin/internal.lua @@ -614,13 +614,15 @@ internal.help_tags = function(opts) if not line:match "^!_TAG_" then local fields = vim.split(line, delimiter, true) if #fields == 3 and not tags_map[fields[1]] then - table.insert(tags, { - name = fields[1], - filename = help_files[fields[2]], - cmd = fields[3], - lang = lang, - }) - tags_map[fields[1]] = true + if fields[1] ~= "help-tags" or fields[2] ~= "tags" then + table.insert(tags, { + name = fields[1], + filename = help_files[fields[2]], + cmd = fields[3], + lang = lang, + }) + tags_map[fields[1]] = true + end end end end |
