all repos — fluxbox @ 48929dab4d40f658b964596cd06e74dc3f059451

custom fork of the fluxbox windowmanager

small fix
rathnor rathnor
commit

48929dab4d40f658b964596cd06e74dc3f059451

parent

81e4fe8d44a3f0bd8c104127d7785badab6f2bc8

1 files changed, 14 insertions(+), 7 deletions(-)

jump to
M src/Keys.ccsrc/Keys.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Keys.cc,v 1.28 2003/06/08 14:32:28 rathnor Exp $ +//$Id: Keys.cc,v 1.29 2003/06/08 14:54:05 rathnor Exp $ #include "Keys.hh"

@@ -297,14 +297,21 @@

last_key->action = m_actionlist[i].action; switch(last_key->action) { case Keys::RESTART: - case Keys::EXECUTE: - last_key->execcommand = - const_cast<char *> - (FbTk::StringUtil::strcasestr( + case Keys::EXECUTE: { + // skip past the command + const char *str = + FbTk::StringUtil::strcasestr( linebuffer.c_str(), getActionStr(last_key->action)) - + strlen(getActionStr(last_key->action)) + 1); - break; + + strlen(getActionStr(last_key->action)); + + int i=0; + // skip past any trailing whitespace + while (str[i] == ' ' || str[i] == '\t') + ++i; + + last_key->execcommand = str + i; + } break; case WORKSPACE: case SENDTOWORKSPACE: if (argc + 1 < val.size())