diff --git a/src/InputHandler.ts b/src/InputHandler.ts index bbf17b60..5dbdb420 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -123,6 +123,7 @@ export class InputHandler implements IInputHandler { this._terminal.y--; this._terminal.scroll(); } + // If the end of the line is hit, prevent this action from wrapping around to the next line. if (this._terminal.x >= this._terminal.cols) { this._terminal.x--; } @@ -220,6 +221,7 @@ export class InputHandler implements IInputHandler { if (this._terminal.y >= this._terminal.rows) { this._terminal.y = this._terminal.rows - 1; } + // If the end of the line is hit, prevent this action from wrapping around to the next line. if (this._terminal.x >= this._terminal.cols) { this._terminal.x--; } @@ -249,6 +251,7 @@ export class InputHandler implements IInputHandler { if (param < 1) { param = 1; } + // If the end of the line is hit, prevent this action from wrapping around to the next line. if (this._terminal.x >= this._terminal.cols) { this._terminal.x--; } @@ -701,6 +704,7 @@ export class InputHandler implements IInputHandler { if (this._terminal.y >= this._terminal.rows) { this._terminal.y = this._terminal.rows - 1; } + // If the end of the line is hit, prevent this action from wrapping around to the next line. if (this._terminal.x >= this._terminal.cols) { this._terminal.x--; } diff --git a/src/xterm.js b/src/xterm.js index ca5b642e..560db5fe 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -2303,6 +2303,7 @@ Terminal.prototype.index = function() { this.y--; this.scroll(); } + // If the end of the line is hit, prevent this action from wrapping around to the next line. if (this.x >= this.cols) { this.x--; }