Fix more references to buffer.x

This commit is contained in:
Paris Kasidiaris
2017-07-16 03:47:15 +03:00
committed by Paris Kasidiaris
parent 73b4bfb5f8
commit d75e0b99d5
+4 -4
View File
@@ -2079,7 +2079,7 @@ Terminal.prototype.setupStops = function(i) {
* @param {number} x The position to move the cursor to the previous tab stop.
*/
Terminal.prototype.prevStop = function(x) {
if (x == null) x = this.x;
if (x == null) x = this.buffer.x;
while (!this.tabs[--x] && x > 0);
return x >= this.cols
? this.cols - 1
@@ -2092,7 +2092,7 @@ Terminal.prototype.prevStop = function(x) {
* @param {number} x The position to move the cursor one tab stop forward.
*/
Terminal.prototype.nextStop = function(x) {
if (x == null) x = this.x;
if (x == null) x = this.buffer.x;
while (!this.tabs[++x] && x < this.cols);
return x >= this.cols
? this.cols - 1
@@ -2268,7 +2268,7 @@ Terminal.prototype.index = function() {
}
// If the end of the line is hit, prevent this action from wrapping around to the next line.
if (this.buffer.x >= this.cols) {
this.x--;
this.buffer.x--;
}
};
@@ -2314,7 +2314,7 @@ Terminal.prototype.reset = function() {
* ESC H Tab Set (HTS is 0x88).
*/
Terminal.prototype.tabSet = function() {
this.tabs[this.x] = true;
this.tabs[this.buffer.x] = true;
};
/**