text-buffer
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -193,11 +193,11 @@ (function() { | ||
TextBuffer.prototype.insertText = function(position, text, normalizeLineEndings) { | ||
TextBuffer.prototype.insert = function(position, text, normalizeLineEndings) { | ||
return this.setTextInRange(new Range(position, position), text, normalizeLineEndings); | ||
}; | ||
TextBuffer.prototype.appendText = function(text, normalizeLineEndings) { | ||
return this.insertText(this.getLastPosition(), text, normalizeLineEndings); | ||
TextBuffer.prototype.append = function(text, normalizeLineEndings) { | ||
return this.insert(this.getEndPosition(), text, normalizeLineEndings); | ||
}; | ||
TextBuffer.prototype.deleteText = function(range) { | ||
TextBuffer.prototype["delete"] = function(range) { | ||
return this.setTextInRange(range, ''); | ||
@@ -220,3 +220,3 @@ }; | ||
if (startRow > lastRow) { | ||
return new Range(this.getLastPosition(), this.getLastPosition()); | ||
return new Range(this.getEndPosition(), this.getEndPosition()); | ||
} | ||
@@ -236,3 +236,3 @@ startRow = Math.max(0, startRow); | ||
} | ||
return this.deleteText(new Range(startPoint, endPoint)); | ||
return this["delete"](new Range(startPoint, endPoint)); | ||
}; | ||
@@ -361,3 +361,3 @@ | ||
} else if (row > this.getLastRow()) { | ||
return this.getLastPosition(); | ||
return this.getEndPosition(); | ||
} else { | ||
@@ -377,3 +377,3 @@ column = Math.min(Math.max(column, 0), this.lineLengthForRow(row)); | ||
TextBuffer.prototype.getLastPosition = function() { | ||
TextBuffer.prototype.getEndPosition = function() { | ||
var lastRow; | ||
@@ -385,3 +385,3 @@ lastRow = this.getLastRow(); | ||
TextBuffer.prototype.getRange = function() { | ||
return new Range(this.getFirstPosition(), this.getLastPosition()); | ||
return new Range(this.getFirstPosition(), this.getEndPosition()); | ||
}; | ||
@@ -416,3 +416,3 @@ | ||
if (rows > this.getLastRow()) { | ||
return this.getLastPosition(); | ||
return this.getEndPosition(); | ||
} else { | ||
@@ -419,0 +419,0 @@ return new Point(rows, offset - characters); |
{ | ||
"name": "text-buffer", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "A container for large mutable strings with annotated regions", | ||
@@ -5,0 +5,0 @@ "main": "./lib/text-buffer", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61904