- made --shellvars into --shellvar and make it only one list of commands passed to the Tcl. The list is separated by comma but without spaces. The variables are accessed in Tcl with the names shellvar_x where x is the index in the list of command comma separated values

- fixed an issue in the TclShell that generated an exception IndexError which crashed the software
This commit is contained in:
Marius Stanciu
2019-09-17 18:37:34 +03:00
parent 71b945c05e
commit 608f1dd958
3 changed files with 32 additions and 25 deletions

View File

@@ -142,10 +142,13 @@ class TermWidget(QWidget):
self._append_to_browser('in', '> ' + text + '\n')
if len(self._history) < 2 or self._history[-2] != text: # don't insert duplicating items
if text[-1] == '\n':
self._history.insert(-1, text[:-1])
else:
self._history.insert(-1, text)
try:
if text[-1] == '\n':
self._history.insert(-1, text[:-1])
else:
self._history.insert(-1, text)
except IndexError:
return
self._historyIndex = len(self._history) - 1