From be1953e00e900e7c91e11b2c94612b5e41ec2566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20P=C3=BCtz?= Date: Thu, 9 May 2024 22:15:33 +0200 Subject: [PATCH] Fix handling of special keys (#38) --- lua/libmodal/Mode.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/libmodal/Mode.lua b/lua/libmodal/Mode.lua index 99e2e51..dc0d7d6 100644 --- a/lua/libmodal/Mode.lua +++ b/lua/libmodal/Mode.lua @@ -293,7 +293,7 @@ function Mode:get_user_input() -- set the global input variable to the new input. self.input:set(user_input) - if ZERO <= user_input and user_input <= NINE then + if type(user_input) == "number" and ZERO <= user_input and user_input <= NINE then local oldCount = self.count:get() local newCount = tonumber(oldCount .. string.char(user_input)) self.count:set(newCount)