summaryrefslogtreecommitdiff
path: root/js/codeq/python.js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-09-22 09:35:39 +0200
committerAleš Smodiš <aless@guru.si>2015-09-22 09:35:39 +0200
commit20a9bac2cb976ea385f8c3bb530e2d9ae2972e71 (patch)
treed672303272134f3dde02fd8cb78bfe9d020b3fa4 /js/codeq/python.js
parentcee672f22d516ecc73f84a3dbe01328883a2a47d (diff)
Bugfix python terminal: unregister terminal_output on exit, declare the "lines" variable.
Diffstat (limited to 'js/codeq/python.js')
-rw-r--r--js/codeq/python.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/codeq/python.js b/js/codeq/python.js
index 39077d8..e5b59c2 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -126,9 +126,9 @@
};
codeq.comms.on('terminal_output', function (data) {
- var text = data.text;
+ var text = data.text,
+ lines = text.split('\n');
terminal.append(text, 'output');
- lines = text.split('\n');
terminal.leftmostCol = lines[lines.length-1].length;
});
@@ -270,6 +270,7 @@
destroy: function () {
jqAllButtons.off();
editor.off('change');
+ codeq.comms.off('terminal_output'); // stop listening for the terminal events from server
hinter.destroy();
terminal.destroy();
jqDescriptionContent.empty();