fix(help_tags): exclude invalid help-tag that errors

fix #1858
This commit is contained in:
Simon Hauser
2022-04-25 22:28:58 +02:00
parent fce74f509d
commit fd9e1e1674

View File

@@ -614,13 +614,15 @@ internal.help_tags = function(opts)
if not line:match "^!_TAG_" then if not line:match "^!_TAG_" then
local fields = vim.split(line, delimiter, true) local fields = vim.split(line, delimiter, true)
if #fields == 3 and not tags_map[fields[1]] then if #fields == 3 and not tags_map[fields[1]] then
table.insert(tags, { if fields[1] ~= "help-tags" or fields[2] ~= "tags" then
name = fields[1], table.insert(tags, {
filename = help_files[fields[2]], name = fields[1],
cmd = fields[3], filename = help_files[fields[2]],
lang = lang, cmd = fields[3],
}) lang = lang,
tags_map[fields[1]] = true })
tags_map[fields[1]] = true
end
end end
end end
end end