From d75e0b99d5897d039da1b24a3685ce2051e676e9 Mon Sep 17 00:00:00 2001 From: Paris Kasidiaris Date: Sun, 18 Jun 2017 21:15:08 +0300 Subject: [PATCH] Fix more references to `buffer.x` --- src/xterm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index 55c095d4..5d552fc9 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -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; }; /**