Skip to content

Commit

Permalink
fix(help): ignore disabled mappings (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
olexsmir authored Dec 18, 2024
1 parent 92e8b51 commit 4c2528a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/orgmode/objects/help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,16 @@ function Help._generate_mappings(buffer_type, title)
maps = table.concat(maps, ', ')
end

if type(maps) == 'boolean' and not maps then
goto continue
end

table.insert(
content,
string.format(' `%-12s` - %s', string.gsub(maps, '<prefix>', mappings.prefix), item.description)
)

::continue::
end
table.insert(content, '')
return content
Expand Down

0 comments on commit 4c2528a

Please sign in to comment.