diff options
author | 2014-10-18 21:14:14 -0400 | |
---|---|---|
committer | 2014-10-18 21:14:14 -0400 | |
commit | 322c18cfa38f060a7267d79d4562ab0df94cf30e (patch) | |
tree | 42e1ce310046bd38d252d6576d3640e66d36cf1f /src/textadept.c | |
parent | 1a95f6cad42e99e477e2b1532f6a234b4b586006 (diff) | |
download | textadept-322c18cfa38f060a7267d79d4562ab0df94cf30e.tar.gz textadept-322c18cfa38f060a7267d79d4562ab0df94cf30e.zip |
Handle unknown CSI events and bracketed pasted in the terminal version.
For bracketed paste, turn off auto-pair and auto-indent.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/textadept.c b/src/textadept.c index 86d457d1..4d433087 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -2409,6 +2409,19 @@ int main(int argc, char **argv) { else if (key.type == TERMKEY_TYPE_KEYSYM && key.code.sym >= 0 && key.code.sym <= TERMKEY_SYM_END) c = keysyms[key.code.sym]; + else if (key.type == TERMKEY_TYPE_UNKNOWN_CSI) { + long args[16]; + size_t nargs = 16; + unsigned long cmd; + termkey_interpret_csi(ta_tk, &key, args, &nargs, &cmd); + lua_newtable(lua); + for (int i = 0; i < nargs; i++) + lua_pushinteger(lua, args[i]), lua_rawseti(lua, -2, i + 1); + lL_event(lua, "csi", LUA_TNUMBER, cmd, LUA_TTABLE, + luaL_ref(lua, LUA_REGISTRYINDEX), -1); + refresh_all(); + continue; + } else continue; // skip unknown types int shift = key.modifiers & TERMKEY_KEYMOD_SHIFT; int ctrl = key.modifiers & TERMKEY_KEYMOD_CTRL; int alt = key.modifiers & TERMKEY_KEYMOD_ALT; |