Index: third_party/WebKit/Source/devtools/front_end/common/Text.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Text.js b/third_party/WebKit/Source/devtools/front_end/common/Text.js |
index 3e62f17a72147c7ff52d1ed7026a37253cc1dc09..cc49351d8dac9da1b960ab825743538c618c89b2 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/common/Text.js |
+++ b/third_party/WebKit/Source/devtools/front_end/common/Text.js |
@@ -129,6 +129,16 @@ WebInspector.TextCursor.prototype = { |
}, |
/** |
+ * @param {number} offset |
+ */ |
+ resetTo: function(offset) |
+ { |
+ this._offset = offset; |
+ this._lineNumber = this._lineEndings.lowerBound(offset); |
+ this._columnNumber = this._lineNumber ? this._offset - this._lineEndings[this._lineNumber - 1] - 1 : this._offset; |
+ }, |
+ |
+ /** |
* @return {number} |
*/ |
lineNumber: function() |