add ^M-O for toggling output scroll

This commit is contained in:
MinRK 2012-06-10 21:26:17 -07:00
parent 5f0b08145e
commit ed4ee44a21
2 changed files with 16 additions and 1 deletions

View File

@ -214,6 +214,11 @@ var IPython = (function (IPython) {
};
CodeCell.prototype.toggle_output_scroll = function () {
this.output_area.toggle_scroll();
};
CodeCell.prototype.set_input_prompt = function (number) {
this.input_prompt_number = number;
var ns = number || " ";

View File

@ -191,7 +191,11 @@ var IPython = (function (IPython) {
return false;
} else if (event.which === 79 && that.control_key_active) {
// Toggle output = o
that.toggle_output();
if (event.shiftKey){
that.toggle_output_scroll();
} else {
that.toggle_output();
}
that.control_key_active = false;
return false;
} else if (event.which === 83 && that.control_key_active) {
@ -865,6 +869,12 @@ var IPython = (function (IPython) {
};
Notebook.prototype.toggle_output_scroll = function (index) {
var i = this.index_or_selected(index);
this.get_cell(i).toggle_output_scroll();
};
Notebook.prototype.collapse_all_output = function () {
var ncells = this.ncells();
var cells = this.get_cells();