Skip to content

Commit

Permalink
Merge pull request #5545 from adamblake/patch-1
Browse files Browse the repository at this point in the history
Respect cell.is_editable during find-and-replace
  • Loading branch information
kevin-bates authored Jul 4, 2020
2 parents b152dd3 + f2db026 commit 3941004
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions notebook/static/notebook/js/searchandreplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ define([
var cells = get_cells(env);
for (var c = 0; c < cells.length; c++) {
var cell = cells[c];
if (!cell.is_editable()) {
continue;
}

var oldvalue = cell.code_mirror.getValue();
var newvalue = oldvalue.replace(reg , replaceValue);
cell.code_mirror.setValue(newvalue);
Expand Down

0 comments on commit 3941004

Please sign in to comment.