From 4c2528a234f50930deb10c334e1db263cfeb7b3f Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Wed, 18 Dec 2024 07:04:24 +0200 Subject: [PATCH] fix(help): ignore disabled mappings (#840) --- lua/orgmode/objects/help.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/orgmode/objects/help.lua b/lua/orgmode/objects/help.lua index 3ae1c8db5..975b5f32c 100644 --- a/lua/orgmode/objects/help.lua +++ b/lua/orgmode/objects/help.lua @@ -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, '', mappings.prefix), item.description) ) + + ::continue:: end table.insert(content, '') return content