Add colon in set_cmd

This commit is contained in:
Florian Bruhin 2014-01-21 12:01:28 +01:00
parent 133e4c4b61
commit 06b1683033
2 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,7 @@ class KeyParser(QObject):
self.keystring += txt
if self.keystring == ':':
self.set_cmd_text.emit(':')
self.set_cmd_text.emit('')
self.keystring = ''
return
@ -94,7 +94,7 @@ class KeyParser(QObject):
except ArgumentCountError:
logging.debug('Filling statusbar with partial command {}'.format(
cmdstr_hay))
self.set_cmd_text.emit(':{} '.format(cmdstr_hay))
self.set_cmd_text.emit(cmdstr_hay + ' ')
return
self.commandparser.run(count=count)

View File

@ -177,7 +177,7 @@ class StatusCommand(QLineEdit):
def set_cmd(self, text):
"""Preset the statusbar to some text"""
self.setText(text)
self.setText(':' + text)
self.setFocus()
def focusOutEvent(self, e):
@ -215,7 +215,7 @@ class StatusCommand(QLineEdit):
self._histpos -= 1
logging.debug("history up: {} / len {} / pos {}".format(
self._tmphist, len(self._tmphist), self._histpos))
self.set_cmd(':' + self._tmphist[self._histpos])
self.set_cmd(self._tmphist[self._histpos])
def key_down_handler(self):
logging.debug("history up [pre]: pos {}".format(self._histpos,
@ -227,7 +227,7 @@ class StatusCommand(QLineEdit):
self._histpos += 1
logging.debug("history up: {} / len {} / pos {}".format(
self._tmphist, len(self._tmphist), self._histpos))
self.set_cmd(':' + self._tmphist[self._histpos])
self.set_cmd(self._tmphist[self._histpos])
def key_tab_handler(self):
# TODO implement tab completion