Add colon in set_cmd
This commit is contained in:
parent
133e4c4b61
commit
06b1683033
@ -52,7 +52,7 @@ class KeyParser(QObject):
|
|||||||
self.keystring += txt
|
self.keystring += txt
|
||||||
|
|
||||||
if self.keystring == ':':
|
if self.keystring == ':':
|
||||||
self.set_cmd_text.emit(':')
|
self.set_cmd_text.emit('')
|
||||||
self.keystring = ''
|
self.keystring = ''
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ class KeyParser(QObject):
|
|||||||
except ArgumentCountError:
|
except ArgumentCountError:
|
||||||
logging.debug('Filling statusbar with partial command {}'.format(
|
logging.debug('Filling statusbar with partial command {}'.format(
|
||||||
cmdstr_hay))
|
cmdstr_hay))
|
||||||
self.set_cmd_text.emit(':{} '.format(cmdstr_hay))
|
self.set_cmd_text.emit(cmdstr_hay + ' ')
|
||||||
return
|
return
|
||||||
self.commandparser.run(count=count)
|
self.commandparser.run(count=count)
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ class StatusCommand(QLineEdit):
|
|||||||
|
|
||||||
def set_cmd(self, text):
|
def set_cmd(self, text):
|
||||||
"""Preset the statusbar to some text"""
|
"""Preset the statusbar to some text"""
|
||||||
self.setText(text)
|
self.setText(':' + text)
|
||||||
self.setFocus()
|
self.setFocus()
|
||||||
|
|
||||||
def focusOutEvent(self, e):
|
def focusOutEvent(self, e):
|
||||||
@ -215,7 +215,7 @@ class StatusCommand(QLineEdit):
|
|||||||
self._histpos -= 1
|
self._histpos -= 1
|
||||||
logging.debug("history up: {} / len {} / pos {}".format(
|
logging.debug("history up: {} / len {} / pos {}".format(
|
||||||
self._tmphist, len(self._tmphist), self._histpos))
|
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):
|
def key_down_handler(self):
|
||||||
logging.debug("history up [pre]: pos {}".format(self._histpos,
|
logging.debug("history up [pre]: pos {}".format(self._histpos,
|
||||||
@ -227,7 +227,7 @@ class StatusCommand(QLineEdit):
|
|||||||
self._histpos += 1
|
self._histpos += 1
|
||||||
logging.debug("history up: {} / len {} / pos {}".format(
|
logging.debug("history up: {} / len {} / pos {}".format(
|
||||||
self._tmphist, len(self._tmphist), self._histpos))
|
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):
|
def key_tab_handler(self):
|
||||||
# TODO implement tab completion
|
# TODO implement tab completion
|
||||||
|
Loading…
Reference in New Issue
Block a user