Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ctrl-Enter now does not delete input, but selects it.

  • Loading branch information...
commit c586fb097455abcfeaaccbca96f7023ad35ec880 1 parent 88bc8b6
Brian E. Granger authored
9 IPython/frontend/html/notebook/static/js/codecell.js
View
@@ -190,6 +190,15 @@ var IPython = (function (IPython) {
};
+ CodeCell.prototype.select_all = function () {
+ var start = {line: 0, ch: 0};
+ var nlines = this.code_mirror.lineCount();
+ var last_line = this.code_mirror.getLine(nlines-1);
+ var end = {line: nlines-1, ch: last_line.length};
+ this.code_mirror.setSelection(start, end);
+ };
+
+
CodeCell.prototype.append_output = function (json) {
this.expand();
if (json.output_type === 'pyout') {
2  IPython/frontend/html/notebook/static/js/notebook.js
View
@@ -776,7 +776,7 @@ var IPython = (function (IPython) {
cell.render();
}
if (default_options.terminal) {
- cell.clear_input();
+ cell.select_all();
} else {
if ((cell_index === (that.ncells()-1)) && default_options.add_new) {
that.insert_code_cell_below();
Please sign in to comment.
Something went wrong with that request. Please try again.