Show More
@@ -405,20 +405,26 define([ | |||||
405 | this.widget_subarea.height(''); |
|
405 | this.widget_subarea.height(''); | |
406 | this.widget_area.height(''); |
|
406 | this.widget_area.height(''); | |
407 | this.widget_area.hide(); |
|
407 | this.widget_area.hide(); | |
|
408 | ||||
|
409 | var old_msg_id = this.last_msg_id; | |||
408 |
|
410 | |||
|
411 | if (old_msg_id) { | |||
|
412 | this.kernel.clear_callbacks_for_msg(old_msg_id); | |||
|
413 | if (old_msg_id) { | |||
|
414 | delete CodeCell.msg_cells[old_msg_id]; | |||
|
415 | } | |||
|
416 | } | |||
|
417 | if (this.get_text().trim().length === 0) { | |||
|
418 | // nothing to do | |||
|
419 | this.set_input_prompt(null); | |||
|
420 | return; | |||
|
421 | } | |||
409 | this.set_input_prompt('*'); |
|
422 | this.set_input_prompt('*'); | |
410 | this.element.addClass("running"); |
|
423 | this.element.addClass("running"); | |
411 | if (this.last_msg_id) { |
|
|||
412 | this.kernel.clear_callbacks_for_msg(this.last_msg_id); |
|
|||
413 | } |
|
|||
414 | var callbacks = this.get_callbacks(); |
|
424 | var callbacks = this.get_callbacks(); | |
415 |
|
425 | |||
416 | var old_msg_id = this.last_msg_id; |
|
|||
417 | this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true, |
|
426 | this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true, | |
418 | stop_on_error : stop_on_error}); |
|
427 | stop_on_error : stop_on_error}); | |
419 | if (old_msg_id) { |
|
|||
420 | delete CodeCell.msg_cells[old_msg_id]; |
|
|||
421 | } |
|
|||
422 | CodeCell.msg_cells[this.last_msg_id] = this; |
|
428 | CodeCell.msg_cells[this.last_msg_id] = this; | |
423 | this.render(); |
|
429 | this.render(); | |
424 | this.events.trigger('execute.CodeCell', {cell: this}); |
|
430 | this.events.trigger('execute.CodeCell', {cell: this}); |
General Comments 0
You need to be logged in to leave comments.
Login now