Skip to content

Commit 3c2dc3c

Browse files
committed
Properly populate the command field on keybinds
1 parent ec2b309 commit 3c2dc3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/modules/Hotkey.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ bool HotkeyManager::addKeybind(KeySpec spec, std::string cmd) {
116116
KeyBinding binding;
117117
binding.spec = spec;
118118
binding.cmdline = cmd;
119+
size_t space_idx = cmd.find(' ');
120+
binding.command = space_idx == std::string::npos ? cmd : cmd.substr(0, space_idx);
119121

120122
std::lock_guard<std::mutex> l(lock);
121123
auto& bindings = this->bindings[binding.spec.sym];

0 commit comments

Comments
 (0)