| Index: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| index 41d0d9ba36d49fce89744efb2f175f76520b572d..bc2ac63dc200cd166c0f97873225d9de7172d6b6 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| @@ -144,7 +144,8 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
|
|
| this._codeMirror.setOption('flattenSpans', false);
|
|
|
| - this._codeMirror.setOption('maxHighlightLength', TextEditor.CodeMirrorTextEditor.maxHighlightLength);
|
| + this._codeMirror.setOption(
|
| + 'maxHighlightLength', options.maxHighlightLength || TextEditor.CodeMirrorTextEditor.maxHighlightLength);
|
| this._codeMirror.setOption('mode', null);
|
| this._codeMirror.setOption('crudeMeasuringFrom', 1000);
|
|
|
| @@ -695,6 +696,14 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
| }
|
|
|
| /**
|
| + * @param {!Object} mode
|
| + */
|
| + setHighlightMode(mode) {
|
| + this._mimeType = '';
|
| + this._codeMirror.setOption('mode', mode);
|
| + }
|
| +
|
| + /**
|
| * @protected
|
| * @param {string} mimeType
|
| */
|
| @@ -731,6 +740,13 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
| }
|
|
|
| /**
|
| + * @param {function(number):string} formatter
|
| + */
|
| + setLineNumberFormatter(formatter) {
|
| + this._codeMirror.setOption('lineNumberFormatter', formatter);
|
| + }
|
| +
|
| + /**
|
| * @override
|
| * @param {function(!KeyboardEvent)} handler
|
| */
|
|
|