aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-01-29 09:56:17 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-01-29 09:56:17 -0500
commit0ce6dc459507ad755d006a2050b6566cb6f429ca (patch)
tree1cbd134714a28dac8803b7c396f51936752f5621 /src
parent1e00f8e5d3cffb0300d56231746ff84e35e1c2af (diff)
`buffer:clear_cmd_key()` should only take one argument.
The `bit32` library makes bit shifting easier.
Diffstat (limited to 'src')
-rw-r--r--src/textadept.c7
1 files changed, 1 insertions, 6 deletions
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;
}