From 6e5d3c8aec03d34b5d195cc920cc4c2f123a1cb2 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Tue, 22 Aug 2023 11:58:07 +1200 Subject: fixup: Made regex work better --- keybinds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keybinds.cpp') diff --git a/keybinds.cpp b/keybinds.cpp index a4a78c0..2e4ebe2 100644 --- a/keybinds.cpp +++ b/keybinds.cpp @@ -168,7 +168,7 @@ const Keybind KeybindsModule::emacsBindMode(string bindString) Keybind bind; bind.modifiers = 0; - const std::regex keyRegex("^(?:([CMs])-)?(?:([CMs])-)?(?:([CMs])-)?([^\\s]+)$"); + const std::regex keyRegex("^(?:([CMs])-)?(?:([CMs])-)?(?:([CMs])-)?([^\s]|(SPC|ESC|RET|))$"); std::smatch keyMatch; if(std::regex_match(bindString, keyMatch, keyRegex)) { -- cgit v1.2.3