| 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 4f27a0a3805a1d69bb03aaf5dbc67c65481c5507..9e19a71505c21572d6a073043c1f315abc3b7df5 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
|
| @@ -160,6 +160,9 @@ WebInspector.CodeMirrorTextEditor = function(options)
|
| this.element.addEventListener("keydown", this._handleKeyDown.bind(this), true);
|
| this.element.addEventListener("keydown", this._handlePostKeyDown.bind(this), false);
|
| this.element.tabIndex = 0;
|
| +
|
| + this._needsRefresh = true;
|
| +
|
| if (options.mimeType)
|
| this.setMimeType(options.mimeType);
|
| }
|
| @@ -527,10 +530,21 @@ WebInspector.CodeMirrorTextEditor.prototype = {
|
| */
|
| wasShown: function()
|
| {
|
| - if (this._wasOnceShown)
|
| + if (this._needsRefresh)
|
| + this.refresh();
|
| + },
|
| +
|
| + /**
|
| + * @protected
|
| + */
|
| + refresh: function()
|
| + {
|
| + if (this.isShowing()) {
|
| + this._codeMirror.refresh();
|
| + this._needsRefresh = false;
|
| return;
|
| - this._wasOnceShown = true;
|
| - this._codeMirror.refresh();
|
| + }
|
| + this._needsRefresh = true;
|
| },
|
|
|
| /**
|
|
|