From 638c3ac10003f66ef4af43f50ee365c9036da0fe Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Sat, 24 Jun 2023 20:26:29 +1200 Subject: feat: Added ; as a command separator --- keybinds.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'keybinds.cpp') 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 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 keys = split(argv[0].str, '+'); Keybind bind; -- cgit v1.2.3