From 730e398b821b57ad54d188adbf4e59bee19b7594 Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 10 Mar 2005 16:51:24 +0000 Subject: 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. --- src/CommandParser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommandParser.cc b/src/CommandParser.cc index d4c6a28..ec0ddfe 100644 --- a/src/CommandParser.cc +++ b/src/CommandParser.cc @@ -56,6 +56,7 @@ FbTk::Command *CommandParser::parseLine(const string &line) { 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 @@ FbTk::Command *CommandParser::parseLine(const string &line) { } // now we have parsed command and arguments - command = toLower(command); // we didn't find any matching command in default commands, -- cgit v0.11.2