Merge pull request #500 from Tyriar/fix_vt_tests

Fix many vt tests
This commit is contained in:
Daniel Imms
2017-01-26 08:55:42 -08:00
committed by GitHub
5 changed files with 51 additions and 13 deletions
+16 -1
View File
@@ -60,7 +60,6 @@ export class InputHandler implements IInputHandler {
this._terminal.scroll();
}
} else {
this._terminal.x = this._terminal.cols - 1;
if (ch_width === 2) // FIXME: check for xterm behavior
return;
}
@@ -124,6 +123,10 @@ 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--;
}
}
/**
@@ -218,6 +221,10 @@ 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--;
}
}
/**
@@ -244,6 +251,10 @@ 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--;
}
this._terminal.x -= param;
if (this._terminal.x < 0) {
this._terminal.x = 0;
@@ -693,6 +704,10 @@ 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--;
}
}
/**