mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 15:45:58 +01:00
Allow empty args in hyprctl dispatch (#2724)
This commit is contained in:
parent
cacdb424a9
commit
ddb8c89776
1 changed files with 4 additions and 1 deletions
|
@ -687,7 +687,10 @@ std::string dispatchRequest(std::string in) {
|
||||||
|
|
||||||
const auto DISPATCHSTR = in.substr(0, in.find_first_of(' '));
|
const auto DISPATCHSTR = in.substr(0, in.find_first_of(' '));
|
||||||
|
|
||||||
const auto DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
|
auto DISPATCHARG = std::string();
|
||||||
|
if ((int) in.find_first_of(' ') != -1)
|
||||||
|
DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
|
||||||
|
|
||||||
|
|
||||||
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(DISPATCHSTR);
|
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(DISPATCHSTR);
|
||||||
if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end())
|
if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end())
|
||||||
|
|
Loading…
Reference in a new issue