mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
add ^M-O for toggling output scroll
This commit is contained in:
parent
5f0b08145e
commit
ed4ee44a21
@ -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) {
|
CodeCell.prototype.set_input_prompt = function (number) {
|
||||||
this.input_prompt_number = number;
|
this.input_prompt_number = number;
|
||||||
var ns = number || " ";
|
var ns = number || " ";
|
||||||
|
@ -191,7 +191,11 @@ var IPython = (function (IPython) {
|
|||||||
return false;
|
return false;
|
||||||
} else if (event.which === 79 && that.control_key_active) {
|
} else if (event.which === 79 && that.control_key_active) {
|
||||||
// Toggle output = o
|
// Toggle output = o
|
||||||
that.toggle_output();
|
if (event.shiftKey){
|
||||||
|
that.toggle_output_scroll();
|
||||||
|
} else {
|
||||||
|
that.toggle_output();
|
||||||
|
}
|
||||||
that.control_key_active = false;
|
that.control_key_active = false;
|
||||||
return false;
|
return false;
|
||||||
} else if (event.which === 83 && that.control_key_active) {
|
} 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 () {
|
Notebook.prototype.collapse_all_output = function () {
|
||||||
var ncells = this.ncells();
|
var ncells = this.ncells();
|
||||||
var cells = this.get_cells();
|
var cells = this.get_cells();
|
||||||
|
Loading…
Reference in New Issue
Block a user