From fd9e1e1674c5ae980bc742f773fb78ca80cf8970 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Mon, 25 Apr 2022 22:28:58 +0200 Subject: [PATCH] fix(help_tags): exclude invalid help-tag that errors fix #1858 --- lua/telescope/builtin/internal.lua | 16 +++++++++------- 1 file 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