Skip to content

Commit 012296e

Browse files
committed
minor
1 parent 0b692d3 commit 012296e

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎v3/js/opt-live.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4949
- if these Ace enhancements look good, then I can also use them for
5050
Codeopticon as well!
5151
52+
- get input/raw_input working
53+
5254
- [later] add a codeopticon-style history slider of the user's past
5355
edits (but that might be confusing)
5456
@@ -490,6 +492,7 @@ function optliveExecuteCodeAndCreateViz(codeToExec,
490492
}
491493
}
492494

495+
// overrides the version in opt-frontend.js
493496
function executeCode(forceStartingInstr, forceRawInputLst) {
494497
$('#urlOutput').val(''); // clear to avoid stale values
495498

‎v3/js/pytutor.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ var curVisualizerID = 1; // global to uniquely identify each ExecutionVisualizer
7878
// there's no error, or if there's an error, jump to the
7979
// FIRST ENTRY with an error
8080
// startingInstruction - the (zero-indexed) execution point to display upon rendering
81+
// if this is set, then it *overrides* jumpToEnd
8182
// hideOutput - hide "Program output" display
8283
// codeDivHeight - maximum height of #pyCodeOutputDiv (in integer pixels)
8384
// codeDivWidth - maximum width of #pyCodeOutputDiv (in integer pixels)
@@ -773,6 +774,8 @@ ExecutionVisualizer.prototype.render = function() {
773774
});
774775

775776
if (this.params.startingInstruction) {
777+
this.params.jumpToEnd = false; // override! make sure to handle FIRST
778+
776779
// weird special case for something like:
777780
// e=raw_input(raw_input("Enter something:"))
778781
if (this.params.startingInstruction == this.curTrace.length) {

0 commit comments

Comments
 (0)