diff options
-rw-r--r-- | src/Keys.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/Keys.cc b/src/Keys.cc index 48db064..3adf6ec 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Keys.cc,v 1.28 2003/06/08 14:32:28 rathnor Exp $ | 22 | //$Id: Keys.cc,v 1.29 2003/06/08 14:54:05 rathnor Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "Keys.hh" | 25 | #include "Keys.hh" |
@@ -297,14 +297,21 @@ bool Keys::load(const char *filename) { | |||
297 | last_key->action = m_actionlist[i].action; | 297 | last_key->action = m_actionlist[i].action; |
298 | switch(last_key->action) { | 298 | switch(last_key->action) { |
299 | case Keys::RESTART: | 299 | case Keys::RESTART: |
300 | case Keys::EXECUTE: | 300 | case Keys::EXECUTE: { |
301 | last_key->execcommand = | 301 | // skip past the command |
302 | const_cast<char *> | 302 | const char *str = |
303 | (FbTk::StringUtil::strcasestr( | 303 | FbTk::StringUtil::strcasestr( |
304 | linebuffer.c_str(), | 304 | linebuffer.c_str(), |
305 | getActionStr(last_key->action)) | 305 | getActionStr(last_key->action)) |
306 | + strlen(getActionStr(last_key->action)) + 1); | 306 | + strlen(getActionStr(last_key->action)); |
307 | break; | 307 | |
308 | int i=0; | ||
309 | // skip past any trailing whitespace | ||
310 | while (str[i] == ' ' || str[i] == '\t') | ||
311 | ++i; | ||
312 | |||
313 | last_key->execcommand = str + i; | ||
314 | } break; | ||
308 | case WORKSPACE: | 315 | case WORKSPACE: |
309 | case SENDTOWORKSPACE: | 316 | case SENDTOWORKSPACE: |
310 | if (argc + 1 < val.size()) | 317 | if (argc + 1 < val.size()) |