diff options
author | rathnor <rathnor> | 2003-06-08 14:54:05 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-06-08 14:54:05 (GMT) |
commit | 48929dab4d40f658b964596cd06e74dc3f059451 (patch) | |
tree | 53c8710707915d23cd738a8ed491d3d9f670ccea /src | |
parent | 81e4fe8d44a3f0bd8c104127d7785badab6f2bc8 (diff) | |
download | fluxbox-48929dab4d40f658b964596cd06e74dc3f059451.zip fluxbox-48929dab4d40f658b964596cd06e74dc3f059451.tar.bz2 |
small fix
Diffstat (limited to 'src')
-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()) |