Merge pull request #5545 from adamblake/patch-1

Respect cell.is_editable during find-and-replace
This commit is contained in:
Kevin Bates 2020-07-04 09:53:06 -07:00 committed by GitHub
commit 3941004e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);