diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-24 20:26:29 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-24 20:26:29 +1200 |
| commit | 638c3ac10003f66ef4af43f50ee365c9036da0fe (patch) | |
| tree | a2e17e4693761e92a6be2d84b12d763e48bb48eb /keybinds.cpp | |
| parent | 87b7f6c47d8eab8bfe7f126652a88939aac58a6a (diff) | |
| download | YATwm-638c3ac10003f66ef4af43f50ee365c9036da0fe.tar.gz YATwm-638c3ac10003f66ef4af43f50ee365c9036da0fe.zip | |
feat: Added ; as a command separator
Diffstat (limited to 'keybinds.cpp')
| -rw-r--r-- | keybinds.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/keybinds.cpp b/keybinds.cpp index 64d3fc8..8448eed 100644 --- a/keybinds.cpp +++ b/keybinds.cpp @@ -39,11 +39,14 @@ const void KeybindsModule::handleKeypress(XKeyEvent e) const void KeybindsModule::bind(const CommandArg* argv) { - Err e = commandsModule.checkCommand(argv[1].str); - if(e.code != NOERR) + std::vector<Err> errs = commandsModule.checkCommand(argv[1].str); + for(Err e : errs) { - e.message = "Binding fail - " + e.message; - throw e; + if(e.code != NOERR) + { + e.message = "Binding fail - " + e.message; + throw e; + } } std::vector<string> keys = split(argv[0].str, '+'); Keybind bind; |
