Index: Source/devtools/front_end/CodeMirrorTextEditor.js |
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js |
index e6185b60ab71e0f00010d8f220feb6104b7756f3..2a5c328cff71bc9b466e28a8fdb985b41c5816ee 100644 |
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js |
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js |
@@ -759,12 +759,16 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
*/ |
setExecutionLine: function(lineNumber) |
{ |
+ this.clearPositionHighlight(); |
this._executionLine = this._codeMirror.getLineHandle(lineNumber); |
+ if (!this._executionLine) |
+ return; |
this._codeMirror.addLineClass(this._executionLine, "wrap", "cm-execution-line"); |
}, |
clearExecutionLine: function() |
{ |
+ this.clearPositionHighlight(); |
if (this._executionLine) |
this._codeMirror.removeLineClass(this._executionLine, "wrap", "cm-execution-line"); |
delete this._executionLine; |
@@ -821,7 +825,7 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
clearTimeout(this._clearHighlightTimeout); |
delete this._clearHighlightTimeout; |
- if (this._highlightedLine) |
+ if (this._highlightedLine) |
this._codeMirror.removeLineClass(this._highlightedLine, null, "cm-highlight"); |
delete this._highlightedLine; |
}, |