| 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 6b5e1898f570c6eed34acf2f3a7b06e522cdfa75..ae2ff7df2041b48d9166cdf94826c9be82cf4e78 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,10 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
|
|
| this._codeMirror.setOption('flattenSpans', false);
|
|
|
| - this._codeMirror.setOption('maxHighlightLength', TextEditor.CodeMirrorTextEditor.maxHighlightLength);
|
| + var maxHighlightLength = options.maxHighlightLength;
|
| + if (typeof maxHighlightLength !== 'number')
|
| + maxHighlightLength = TextEditor.CodeMirrorTextEditor.maxHighlightLength;
|
| + this._codeMirror.setOption('maxHighlightLength', maxHighlightLength);
|
| this._codeMirror.setOption('mode', null);
|
| this._codeMirror.setOption('crudeMeasuringFrom', 1000);
|
|
|
| @@ -696,6 +699,14 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
| }
|
|
|
| /**
|
| + * @param {!Object} mode
|
| + */
|
| + setHighlightMode(mode) {
|
| + this._mimeType = '';
|
| + this._codeMirror.setOption('mode', mode);
|
| + }
|
| +
|
| + /**
|
| * @protected
|
| * @param {string} mimeType
|
| */
|
| @@ -732,6 +743,13 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
|
| }
|
|
|
| /**
|
| + * @param {function(number):string} formatter
|
| + */
|
| + setLineNumberFormatter(formatter) {
|
| + this._codeMirror.setOption('lineNumberFormatter', formatter);
|
| + }
|
| +
|
| + /**
|
| * @override
|
| * @param {function(!KeyboardEvent)} handler
|
| */
|
|
|