aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/macros.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/macros.lua')
-rw-r--r--modules/textadept/macros.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/textadept/macros.lua b/modules/textadept/macros.lua
index b8fe7f63..d02f8786 100644
--- a/modules/textadept/macros.lua
+++ b/modules/textadept/macros.lua
@@ -35,9 +35,8 @@ local event_recorders = {
local key = code < 256 and string.char(code) or keys.KEYSYMS[code]
if key then
if shift and code >= 32 and code < 256 then shift = false end
- local key_seq = string.format(
- '%s%s%s%s%s', control and 'c' or '', alt and 'a' or '',
- meta and OSX and 'm' or '', shift and 's' or '', key)
+ local key_seq = (control and 'c' or '') .. (alt and 'a' or '') ..
+ (meta and OSX and 'm' or '') .. (shift and 's' or '') .. key
for i = 1, #ignore do if keys[key_seq] == ignore[i] then return end end
end
macro[#macro + 1] = {events.KEYPRESS, code, shift, control, alt, meta}