From 7cac28926ad42d0de70975f1b5531ffc87b3dac8 Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:14:22 +1000 Subject: [PATCH] return error rather than truncate steps in validation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index be85018..82c1cd3 100644 --- a/config.go +++ b/config.go @@ -61,7 +61,7 @@ func (m *KeyboardMacro) Validate() error { } if len(m.Steps) > MaxStepsPerMacro { - m.Steps = m.Steps[:MaxStepsPerMacro] + return fmt.Errorf("too many steps in macro (max %d)", MaxStepsPerMacro) } for i := range m.Steps {