mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-26 21:29:48 +01:00
fix commas in free binds
This commit is contained in:
parent
174b593438
commit
85eea70be4
2 changed files with 3 additions and 3 deletions
|
@ -637,7 +637,7 @@ void CConfigManager::handleBind(const std::string& command, const std::string& v
|
|||
return;
|
||||
}
|
||||
|
||||
const auto ARGS = CVarList(value);
|
||||
const auto ARGS = CVarList(value, 4);
|
||||
|
||||
if ((ARGS.size() < 4 && !mouse) || (ARGS.size() < 3 && mouse)) {
|
||||
parseError = "bind: too few args";
|
||||
|
|
|
@ -72,12 +72,12 @@ struct SAnimationPropertyConfig {
|
|||
|
||||
class CVarList {
|
||||
public:
|
||||
CVarList(const std::string& in) {
|
||||
CVarList(const std::string& in, long unsigned int lastArgNo = 0) {
|
||||
std::string curitem = "";
|
||||
std::string argZ = in;
|
||||
|
||||
auto nextItem = [&]() {
|
||||
auto idx = argZ.find_first_of(',');
|
||||
auto idx = lastArgNo != 0 && m_vArgs.size() >= lastArgNo - 1 ? std::string::npos : argZ.find_first_of(',');
|
||||
|
||||
if (idx != std::string::npos) {
|
||||
curitem = argZ.substr(0, idx);
|
||||
|
|
Loading…
Reference in a new issue