mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +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) {
|
||||
this.input_prompt_number = number;
|
||||
var ns = number || " ";
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user