From a89d6b3bae30632d4aadbc6207e0c16455adb79f Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 30 Jun 2025 12:34:40 +0300 Subject: [PATCH] Tutorial: fix non-alt keys shown as alt-combos Lua doesn't have regexes, and "-" has special meaning in match; escape the minus with "%", so it actually matches a minus sign. --- dat/tut-1.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/tut-1.lua b/dat/tut-1.lua index f6a31cf82..9c7eb268d 100644 --- a/dat/tut-1.lua +++ b/dat/tut-1.lua @@ -10,7 +10,7 @@ function tut_key(command) return "Ctrl-" .. m; end - m = s:match("^M-([A-Z])$"); -- M-X is Alt-X + m = s:match("^M%-([A-Z])$"); -- M-X is Alt-X if (m ~= nil) then tut_alt_key = m; return "Alt-" .. m;