Merge remote-tracking branch 'arachsys/hide-unmapped'

This commit is contained in:
Maxime Coste 2023-12-12 21:24:47 +11:00
commit 96b74d1ad6

View File

@ -193,6 +193,8 @@ String build_autoinfo_for_mapping(const Context& context, KeymapMode mode,
for (auto& key : keymaps.get_mapped_keys(mode)) for (auto& key : keymaps.get_mapped_keys(mode))
{ {
const String& docstring = keymaps.get_mapping_docstring(key, mode); const String& docstring = keymaps.get_mapping_docstring(key, mode);
if (keymaps.get_mapping_keys(key, mode).empty() and docstring.empty())
continue;
if (auto it = find_if(descs, [&](auto& elem) { return elem.second == docstring; }); if (auto it = find_if(descs, [&](auto& elem) { return elem.second == docstring; });
it != descs.end()) it != descs.end())
it->first += ',' + to_string(key); it->first += ',' + to_string(key);