fix(#2024): help handles empty mapping description

This commit is contained in:
Alexander Courtis 2023-02-27 20:28:10 +11:00
parent 74959750f7
commit 59bcb01d3b

View File

@ -23,10 +23,9 @@ end
--- Remove prefix 'nvim-tree: '
--- Hardcoded to keep default_on_attach simple
--- @param desc string
--- @return string
--- @return number
--- @return string|nil
local function tidy_desc(desc)
return desc:gsub("^nvim%-tree: ", "")
return desc and desc:gsub("^nvim%-tree: ", "") or ""
end
-- sort lhs roughly as per :help index