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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user