From 5f82a359a35e14a45400cd77e111fdc72989b87c Mon Sep 17 00:00:00 2001 From: Nylme Date: Tue, 19 Nov 2024 08:09:21 +1100 Subject: [PATCH] Fixed deserializing macro labels/names from .toml keymap --- helix-term/src/keymap.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 9347ebbc9..014fc11e7 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -272,6 +272,15 @@ impl<'de> serde::de::Visitor<'de> for KeyTrieVisitor { doc: label, })) } + + // To label/name macro commands from config + Some(MappableCommand::Macro { keys, .. }) if !label.is_empty() => { + Ok(KeyTrie::MappableCommand(MappableCommand::Macro { + keys, + name: label + })) + } + Some(command) => Ok(KeyTrie::MappableCommand(command)), } Some(commands) => {