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.
This commit is contained in:
Pasi Kallinen
2025-06-30 12:34:40 +03:00
parent a93397e286
commit a89d6b3bae

View File

@@ -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;