diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2020-08-21 15:52:40 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2020-08-21 15:52:40 -0400 |
commit | df3c20397818d29e459b4028bbb5bb921713d8e5 (patch) | |
tree | 11f3b679c046d2ea3c0caa84753274e1d79ac5d9 /init.lua | |
parent | f275e0054dbfc6d1604031d93ac08d376c9029fb (diff) |
Code cleanup.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -355,15 +355,11 @@ end, 1) events.connect(events.VIEW_NEW, function() local buffer, view = _G.buffer, _G.view -- Allow redefinitions of these Scintilla key bindings. - local ctrl_keys = { - '[', ']', '/', '\\', 'Z', 'Y', 'X', 'C', 'V', 'A', 'L', 'T', 'D', 'U' - } - for _, key in ipairs(ctrl_keys) do - view:clear_cmd_key(string.byte(key) | view.MOD_CTRL << 16) + for _, code in utf8.codes('[]/\\ZYXCVALTDU') do + view:clear_cmd_key(code | view.MOD_CTRL << 16) end - for _, key in ipairs{'L', 'T', 'U', 'Z'} do -- ctrl+shift keys - view:clear_cmd_key( - string.byte(key) | (view.MOD_CTRL | view.MOD_SHIFT) << 16) + for _, code in utf8.codes('LTUZ') do + view:clear_cmd_key(code | (view.MOD_CTRL | view.MOD_SHIFT) << 16) end -- Since BUFFER_NEW loads themes and settings on startup, only load them for -- subsequent views. |