New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix many vt tests #500
Fix many vt tests #500
Conversation
This fixes 2 tests
Don't wrap cursor to column 0 after an index, fixes 2 tests
Don't wrap cursor to column 0 after an index, fixes 2 tests
This helps partially pass t0014-CAN.in, it won't work 100% however due to the very complex parsing logic of vanilla xterm that gnome-terminal doesn't even seem to match. xterm's source seems to have multiple ignore cases for a set of characters such that an escape sequence like \e!!!!!! prints nothing as the ! continually gets ignored. Our current logic is we ignore the escape sequence immediately in this case and print the !.
Don't wrap cursor to column 0 after a CUB, fixes 3 tests
Don't wrap cursor to column 0 after a CUD, fixes 1 test
Don't wrap cursor to column 0 after a VPR, fixes 1 test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some documentation requests and after fixing the test we are 👍 .
@@ -124,6 +123,9 @@ export class InputHandler implements IInputHandler { | |||
this._terminal.y--; | |||
this._terminal.scroll(); | |||
} | |||
if (this._terminal.x >= this._terminal.cols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the role of these lines here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line comment please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you are shifting things up when you are inserting a line feed, when you are in the bottom line?
@@ -218,6 +220,9 @@ export class InputHandler implements IInputHandler { | |||
if (this._terminal.y >= this._terminal.rows) { | |||
this._terminal.y = this._terminal.rows - 1; | |||
} | |||
if (this._terminal.x >= this._terminal.cols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line comment of what this if clause does please? Seems identical to https://github.com/sourcelair/xterm.js/pull/500/files#r97194377.
@@ -244,6 +249,9 @@ export class InputHandler implements IInputHandler { | |||
if (param < 1) { | |||
param = 1; | |||
} | |||
if (this._terminal.x >= this._terminal.cols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line comment of what this if clause does please? Seems identical to https://github.com/sourcelair/xterm.js/pull/500/files#r97194377.
@@ -693,6 +701,9 @@ export class InputHandler implements IInputHandler { | |||
if (this._terminal.y >= this._terminal.rows) { | |||
this._terminal.y = this._terminal.rows - 1; | |||
} | |||
if (this._terminal.x >= this._terminal.cols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line comment of what this if clause does please? Seems identical to https://github.com/sourcelair/xterm.js/pull/500/files#r97194377.
@@ -2303,6 +2303,9 @@ Terminal.prototype.index = function() { | |||
this.y--; | |||
this.scroll(); | |||
} | |||
if (this.x >= this.cols) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line comment of what this if clause does please? Seems identical to https://github.com/sourcelair/xterm.js/pull/500/files#r97194377.
This is the test case failing: https://github.com/sourcelair/xterm.js/blob/4d5046b5e7047bfcf1f1dba088acb343df1969bb/src/test/test.js#L598 Not sure which of these three |
Any way I can help? |
It's the first expect and I think it's to do with Tyriar@43c3349 I believe it's verifying the wrong behavior. |
@Tyriar Yeah the test checks that with |
@jerch thanks for the clarification, I'll pull the test out 😄 |
@parisk good to look at again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This PR fixes many of the tests in escape-sequence-tests.js, see the commits for details on the individual changes. Previously 10 tests were passing, now 30+ are.
The major fixes:
CAN
has been implemented which cancels any escape sequence, the corresponding test does not work still due to complex ignore logic in xterm that we don't have parity withThere is a failing test:
This is likely because it relied on the previous wraparound disabled logic which I believe was wrong. @jerch thoughts since you added it?