diff options
author | Florrie <towerofnix@gmail.com> | 2017-11-09 00:24:41 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2017-11-09 00:24:41 -0400 |
commit | 8da8488a943362c3f7bc222c3a26640b8591cb04 (patch) | |
tree | 3082f3498069dd5098e085f275946b64984c28a2 /src/keybinder.js | |
parent | 56c969110143652410c48785118ab2a2c1d3519e (diff) | |
parent | 9116735f71e6f392c726006cf7ae5d46ea91ccfa (diff) |
Merge branch 'master' of https://github.com/towerofnix/http-music
Diffstat (limited to 'src/keybinder.js')
-rw-r--r-- | src/keybinder.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keybinder.js b/src/keybinder.js index d6e0113..784484c 100644 --- a/src/keybinder.js +++ b/src/keybinder.js @@ -49,13 +49,16 @@ module.exports.compileKeybindings = function(bindings, commands) { return function(inputData) { if (buffer.equals(inputData)) { commands[command](...args) + return true } } }).filter(Boolean) return function(inputData) { - for (let handler of handlers) { - handler(inputData) + for (const handler of handlers) { + if (handler(inputData)) { + break + } } } } |