diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-13 23:13:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-13 23:13:52 +0200 |
| commit | a1881512f3050e8d6719a28b55846c1f4c93acab (patch) | |
| tree | dc825eecd6bff16a2ca4b76cf48c8f0a5c0090d3 /vis-lua.c | |
| parent | 9a9f7a96f5b02777b8c0823cffd173a72ca3e3c2 (diff) | |
| download | vis-a1881512f3050e8d6719a28b55846c1f4c93acab.tar.gz vis-a1881512f3050e8d6719a28b55846c1f4c93acab.tar.xz | |
vis: clean up key mapping implementation
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -410,21 +410,7 @@ static int map(lua_State *L) { binding->action = action; - char *lhs = strdup(key), *next = lhs; - while (next) { - char tmp; - next = (char*)vis_keys_next(vis, next); - if (next) { - tmp = *next; - *next = '\0'; - } - vis_mode_unmap(vis, mode, lhs); - if (next) - *next = tmp; - } - free(lhs); - - if (!vis_mode_map(vis, mode, key, binding)) + if (!vis_mode_map(vis, mode, true, key, binding)) goto err; lua_pushboolean(L, true); |
