diff options
author | 2020-03-14 12:27:34 -0400 | |
---|---|---|
committer | 2020-03-14 12:27:34 -0400 | |
commit | 51a9603065419f64e1fd191bdf4d8cd95c003064 (patch) | |
tree | 4697bcce2094e29eead5fbe3280aa0365f062a0a /modules/textadept/macros.lua | |
parent | e51c41469c3717804ae45848194bd8da641c68c5 (diff) | |
download | textadept-51a9603065419f64e1fd191bdf4d8cd95c003064.tar.gz textadept-51a9603065419f64e1fd191bdf4d8cd95c003064.zip |
More code cleanup, refactoring, and reformatting.
Diffstat (limited to 'modules/textadept/macros.lua')
-rw-r--r-- | modules/textadept/macros.lua | 5 |
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} |