diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-04-21 16:01:18 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-04-21 16:01:18 +0100 |
commit | 4612419c143c3f748bc5f6ccd467c7c0014e8d48 (patch) | |
tree | 42929aeeb8b1d89abf639124412199fac7092f04 /key-bindings.c | |
parent | 93062ad09952f411d48818b05dc9898bc14dcfde (diff) | |
parent | c799425069d02675474cda312fac1457829052fb (diff) | |
download | rtmux-4612419c143c3f748bc5f6ccd467c7c0014e8d48.tar.gz rtmux-4612419c143c3f748bc5f6ccd467c7c0014e8d48.tar.bz2 rtmux-4612419c143c3f748bc5f6ccd467c7c0014e8d48.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/key-bindings.c b/key-bindings.c index 37ff7fe7..ae7afb71 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -84,7 +84,7 @@ key_bindings_unref_table(struct key_table *table) } void -key_bindings_add(const char *name, key_code key, int can_repeat, +key_bindings_add(const char *name, key_code key, int repeat, struct cmd_list *cmdlist) { struct key_table *table; @@ -104,7 +104,8 @@ key_bindings_add(const char *name, key_code key, int can_repeat, bd->key = key; RB_INSERT(key_bindings, &table->key_bindings, bd); - bd->can_repeat = can_repeat; + if (repeat) + bd->flags |= KEY_BINDING_REPEAT; bd->cmdlist = cmdlist; } @@ -415,7 +416,8 @@ key_bindings_dispatch(struct key_binding *bd, struct client *c, cmdq_append(c, cmdq_get_callback(key_bindings_read_only, NULL)); else { item = cmdq_get_command(bd->cmdlist, fs, m, 0); - item->repeat = bd->can_repeat; + if (bd->flags & KEY_BINDING_REPEAT) + item->shared->flags |= CMDQ_SHARED_REPEAT; cmdq_append(c, item); } } |