From 0ce6dc459507ad755d006a2050b6566cb6f429ca Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 29 Jan 2016 09:56:17 -0500 Subject: `buffer:clear_cmd_key()` should only take one argument. The `bit32` library makes bit shifting easier. --- src/textadept.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3