Major work on the command line tool. Version check on the new website.

This commit is contained in:
Juan Pablo Caram
2014-09-21 21:51:50 -04:00
parent 8cb509d6f3
commit b2cc2f3fdb
47 changed files with 3088 additions and 124 deletions

View File

@@ -171,12 +171,15 @@ class TermWidget(QWidget):
Save current command in the history. Append it to the log. Clear edit line
Reimplement in the child classes to actually execute command
"""
text = self._edit.toPlainText()
text = str(self._edit.toPlainText())
self._append_to_browser('in', '> ' + text + '\n')
if len(self._history) < 2 or\
self._history[-2] != text: # don't insert duplicating items
self._history.insert(-1, text)
if text[-1] == '\n':
self._history.insert(-1, text[:-1])
else:
self._history.insert(-1, text)
self._historyIndex = len(self._history) - 1