| Index: Source/devtools/front_end/CodeMirrorTextEditor.js
|
| diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
|
| index b76cf999393660bd233eacec23619702c0ac1470..35c2239792b6534e25a554f85d796d8d887890aa 100644
|
| --- a/Source/devtools/front_end/CodeMirrorTextEditor.js
|
| +++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
|
| @@ -806,11 +806,10 @@ WebInspector.CodeMirrorTextEditor.prototype = {
|
| */
|
| highlightPosition: function(lineNumber, columnNumber)
|
| {
|
| - if (lineNumber < 0)
|
| - return;
|
| - lineNumber = Math.min(lineNumber, this._codeMirror.lineCount() - 1);
|
| - if (typeof columnNumber !== "number" || columnNumber < 0 || columnNumber > this._codeMirror.getLine(lineNumber).length)
|
| + lineNumber = Number.constrain(lineNumber, 0, this._codeMirror.lineCount() - 1);
|
| + if (typeof columnNumber !== "number")
|
| columnNumber = 0;
|
| + columnNumber = Number.constrain(columnNumber, 0, this._codeMirror.getLine(lineNumber).length);
|
|
|
| this.clearPositionHighlight();
|
| this._highlightedLine = this._codeMirror.getLineHandle(lineNumber);
|
|
|