summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-20 23:41:01 +0100
committerwm4 <wm4@nowhere>2014-11-20 23:41:01 +0100
commit0a78a61d897918c1f013a3d7d308c5a3939c53cc (patch)
treefc84b79ed3160015ffddc1976637027b103bcadd /input/input.c
parenta1811211a29fff3e23f329d735ec72e3ae6dc6a5 (diff)
downloadmpv-0a78a61d897918c1f013a3d7d308c5a3939c53cc.tar.bz2
mpv-0a78a61d897918c1f013a3d7d308c5a3939c53cc.tar.xz
input: add a prefix to make any binding act on key repeat
The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way.
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 52c28123ef..cdfb507b34 100644
--- a/input/input.c
+++ b/input/input.c
@@ -883,7 +883,8 @@ mp_cmd_t *mp_input_read_cmd(struct input_ctx *ictx)
struct mp_cmd *ret = queue_remove_head(&ictx->cmd_queue);
if (!ret) {
ret = check_autorepeat(ictx);
- if (ret)
+ // (if explicitly repeated, don't let command.c ignore it)
+ if (ret && !(ret->flags & MP_ALLOW_REPEAT))
ret->repeated = true;
}
if (ret && ret->mouse_move) {