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
DECSTBM issues #2355
DECSTBM issues #2355
Conversation
@@ -27,5 +27,5 @@ r | |||
s | |||
t | |||
u[78Gvwxyz | |||
[r[24d |
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.
Shouldn't these files not change? We can fork them into new ones if we need slight modifications?
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.
This had to change since the original terminal assumed 80x24, but we test with 80x25. This particular change is needed to reset the scroll bottom to viewport bottom again. Yes we can fork them into new files, if the old test is still relevant (which is not the case 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.
Why did we change it to 25?
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.
The tests were with 25 since I imported them to xterm.js. The 24 to 25 switch happened before that (with my own emulator), cant remember why I changed it in the first place.
Thus all expected results had to be converted (with the python script you can basically run all tests in xterm and grab the viewport output as .text file).
While fixing this issue I just saw that the .text was not rebuild (still containing the plain \n staggering, while we test via pty with \r\n), so I did this to find out that the test does not do the last part correctly due to 24 to 25 switch, thus I had to change the .in file too.
I think some of the not working test files are also not yet converted correctly, gonna fix them when getting to the issues. Doing this file by file with real issues at hand its easier to ensure that the tests actually test the right stuff.
@Tyriar DECSTBM + IND was fixable the same way. Again the test files had to be modified to test all aspects. |
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 to work and test coverage improved 👍
Fixes #2354, fixes #2306.
@Tyriar Note that our way to annotate wrapped lines might get problems here:
xterm.js/src/InputHandler.ts
Lines 419 to 425 in 0958f0e
We set the flag at the new line indicating that it belongs to the previous line, which might mark the last line in viewport as wrapped if we are out of the scroll region. Imho we should set this flag the way around at the leading line meaning that it continues with the next line. I did not change this yet as it would pull in tons of chances in reflow and scroll handling. Btw the problem we have with CBT after RI + IND is also related to this. Same with the issue #1882.
--> Created separate tracking issue #2359.