diff options
-rw-r--r-- | core/ui.lua | 5 | ||||
-rw-r--r-- | src/textadept.c | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/core/ui.lua b/core/ui.lua index c82dce5f..e0ba8aef 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -257,10 +257,11 @@ events_connect(events.VIEW_NEW, function() } local ctrl_shift_keys = {'L', 'T', 'U', 'Z'} for _, key in ipairs(ctrl_keys) do - buffer:clear_cmd_key(string.byte(key), buffer.MOD_CTRL) + buffer:clear_cmd_key(string.byte(key) + bit32.lshift(buffer.MOD_CTRL, 16)) end for _, key in ipairs(ctrl_shift_keys) do - buffer:clear_cmd_key(string.byte(key), buffer.MOD_CTRL + buffer.MOD_SHIFT) + buffer:clear_cmd_key(string.byte(key) + + bit32.lshift(buffer.MOD_CTRL + buffer.MOD_SHIFT, 16)) end -- Since BUFFER_NEW loads themes and settings on startup, only load them for -- subsequent views. diff --git a/src/textadept.c b/src/textadept.c index fa8109c3..867b872d 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1116,12 +1116,7 @@ static int lbuffer_text_range(lua_State *L) { static sptr_t lL_checkscintillaparam(lua_State *L, int *arg, int type) { if (type == SSTRING) return (sptr_t)luaL_checkstring(L, (*arg)++); if (type == SBOOL) return lua_toboolean(L, (*arg)++); - if (type >= SINT && type <= SCOLOR) return luaL_checkinteger(L, (*arg)++); - if (type == SKEYMOD) { - int key = luaL_checkinteger(L, (*arg)++) & 0xFFFF; - return key | ((luaL_checkinteger(L, (*arg)++) & - (SCMOD_SHIFT | SCMOD_CTRL | SCMOD_ALT)) << 16); - } + if (type >= SINT && type <= SKEYMOD) return luaL_checkinteger(L, (*arg)++); return 0; } |