From d4e135e416580f5be54ecea91c4dc2da57d601ea Mon Sep 17 00:00:00 2001 From: Evgeniy Tatarkin Date: Mon, 6 Jan 2025 18:52:03 +0300 Subject: [PATCH] fix: dont use sancode on macros replaying --- helix-term/src/ui/editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index ab7edf46b..31ab46744 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -938,7 +938,12 @@ impl EditorView { fn command_mode(&mut self, mode: Mode, cxt: &mut commands::Context, event: KeyEvent) { #[cfg(feature = "scancode")] - let event = cxt.editor.scancode_apply(event); + // dont use scancode on macros replaying + let event = if cxt.editor.macro_replaying.is_empty() { + cxt.editor.scancode_apply(event) + } else { + event + }; match (event, cxt.editor.count) { // If the count is already started and the input is a number, always continue the count. (key!(i @ '0'..='9'), Some(count)) => {