summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/TextEditorModel.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/TextEditorModel.js')
-rw-r--r--WebCore/inspector/front-end/TextEditorModel.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/WebCore/inspector/front-end/TextEditorModel.js b/WebCore/inspector/front-end/TextEditorModel.js
index e56c269..f23ce76 100644
--- a/WebCore/inspector/front-end/TextEditorModel.js
+++ b/WebCore/inspector/front-end/TextEditorModel.js
@@ -200,6 +200,9 @@ WebInspector.TextEditorModel.prototype = {
copyRange: function(range)
{
+ if (!range)
+ range = new WebInspector.TextRange(0, 0, this._lines.length - 1, this._lines[this._lines.length - 1].length);
+
var clip = [];
if (range.startLine === range.endLine) {
clip.push(this._lines[range.startLine].substring(range.startColumn, range.endColumn));