Skip to content

Commit 59bcb01

Browse files
committed
fix(#2024): help handles empty mapping description
1 parent 7495975 commit 59bcb01

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lua/nvim-tree/renderer/help.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ end
2323
--- Remove prefix 'nvim-tree: '
2424
--- Hardcoded to keep default_on_attach simple
2525
--- @param desc string
26-
--- @return string
27-
--- @return number
26+
--- @return string|nil
2827
local function tidy_desc(desc)
29-
return desc:gsub("^nvim%-tree: ", "")
28+
return desc and desc:gsub("^nvim%-tree: ", "") or ""
3029
end
3130

3231
-- sort lhs roughly as per :help index

0 commit comments

Comments
 (0)