console: Ignore empty texts

This commit is contained in:
Florian Bruhin 2014-08-13 09:08:31 +02:00
parent 4cab864ea0
commit 1a91972a5c

View File

@ -71,9 +71,10 @@ class ConsoleLineEdit(CommandLineEdit):
"""Execute the line of code which was entered."""
self.history.stop()
text = self.text()
self.history.append(text)
self.push(text)
self.setText('')
if text:
self.history.append(text)
self.push(text)
self.setText('')
def push(self, line):
"""Push a line to the interpreter."""