commands with trailing whitespaces were problematic coz the 'argument' was notempty (eg :NextWorkspace or :PrevWorkspace want to have the 'argument' really empty). now the first thing we do is to remove whitespaces from begin and end of the line.
mathias mathias
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/CommandParser.cc
→
src/CommandParser.cc
@@ -56,6 +56,7 @@ // parse arguments and command
string command = line; string arguments; string::size_type first_pos = removeFirstWhitespace(command); + FbTk::StringUtil::removeTrailingWhitespace(command); string::size_type second_pos = command.find_first_of(" \t", first_pos); if (second_pos != string::npos) { // ok we have arguments, parsing them here@@ -65,7 +66,6 @@ command.erase(second_pos); // remove argument from command
} // now we have parsed command and arguments - command = toLower(command); // we didn't find any matching command in default commands,