Fix searching for terms starting with a slash.

Fixes #507.
This commit is contained in:
Florian Bruhin 2015-02-13 22:27:21 +01:00
parent 94b51128d1
commit a38a77b16b
2 changed files with 2 additions and 2 deletions

View File

@ -327,7 +327,7 @@ class Application(QApplication):
win_id = self._get_window(via_ipc, force_tab=True)
log.init.debug("Startup cmd {}".format(cmd))
commandrunner = runners.CommandRunner(win_id)
commandrunner.run_safely_init(cmd.lstrip(':'))
commandrunner.run_safely_init(cmd[1:])
elif not cmd:
log.init.debug("Empty argument")
win_id = self._get_window(via_ipc, force_window=True)

View File

@ -173,7 +173,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
self.history.append(text)
modeman.leave(self._win_id, usertypes.KeyMode.command, 'cmd accept')
if text[0] in signals:
signals[text[0]].emit(text.lstrip(text[0]))
signals[text[0]].emit(text[1:])
@pyqtSlot(usertypes.KeyMode)
def on_mode_left(self, mode):