From 51a9603065419f64e1fd191bdf4d8cd95c003064 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 14 Mar 2020 12:27:34 -0400 Subject: More code cleanup, refactoring, and reformatting. --- modules/textadept/macros.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/textadept/macros.lua') 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} -- cgit v1.2.3