-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
SSH then running a reset caused blank space #6545
Comments
Would you mind sharing the output of... infocmp | grep "rs[123]" in a session where |
Command was run in Ubuntu terminal
|
This is because I can't help thinking this passthrough approach is wrong - I mean idea of "failing" in conpty mode as a way to trigger a passthrough. I'm also not convinced that we should be aborting command sequences (like So instead of: if (success)
{
success = _EraseScrollback();
} we could just have: success = _EraseScrollback() && success; That at least should fix this particular problem. |
I also find the failure=passthrough behavior somewhat suspect. 😄 |
Thanks for digging into this! |
…6763) The VT reset operations `RIS` and `DECSTR` are implemented as a series of steps, each of which could potentially fail. Currently these operations abort as soon as an error is detected, which is particularly problematic in conpty mode, where some steps deliberately "fail" to indicate that they need to be "passed through" to the conpty client. As a result, the reset won't be fully executed. This PR changes that behaviour, so the error state is recorded for any failures, but the subsequent steps are still run. Originally the structure of these operations was of the form: bool success = DoSomething(); if (success) { success = DoSomethingElse(); } But I've now changed the code so it looks more like this: bool success = DoSomething(); success = DoSomethingElse() && success; This means that every one of the steps should execute, regardless of whether previous steps were successful, but the final _success_ state will only be true if none of the steps has failed. While this is only really an issue in the conhost code, I've updated both the `AdaptDispatch` and `TerminalDispatch` classes, since I thought it would be best to have them in sync, and in general this seems like a better way to handle multi-step operations anyway. VALIDATION I've manually tested the `RIS` escape sequence (`\ec`) in the Windows Terminal, and confirmed that it now correctly resets the cursor position, which it wasn't doing before. Closes #6545
…6763) The VT reset operations `RIS` and `DECSTR` are implemented as a series of steps, each of which could potentially fail. Currently these operations abort as soon as an error is detected, which is particularly problematic in conpty mode, where some steps deliberately "fail" to indicate that they need to be "passed through" to the conpty client. As a result, the reset won't be fully executed. This PR changes that behaviour, so the error state is recorded for any failures, but the subsequent steps are still run. Originally the structure of these operations was of the form: bool success = DoSomething(); if (success) { success = DoSomethingElse(); } But I've now changed the code so it looks more like this: bool success = DoSomething(); success = DoSomethingElse() && success; This means that every one of the steps should execute, regardless of whether previous steps were successful, but the final _success_ state will only be true if none of the steps has failed. While this is only really an issue in the conhost code, I've updated both the `AdaptDispatch` and `TerminalDispatch` classes, since I thought it would be best to have them in sync, and in general this seems like a better way to handle multi-step operations anyway. VALIDATION I've manually tested the `RIS` escape sequence (`\ec`) in the Windows Terminal, and confirmed that it now correctly resets the cursor position, which it wasn't doing before. Closes #6545 (cherry picked from commit 0651fcf)
🎉This issue was addressed in #6763, which has now been successfully released as Handy links: |
1 similar comment
🎉This issue was addressed in #6763, which has now been successfully released as Handy links: |
🎉This issue was addressed in #6763, which has now been successfully released as Handy links: |
Environment
Win 10
Windows Terminal Version: 1.0.1401.0
Any other software?
SSH?
Steps to reproduce
Show example in images
Expected behavior
When running reset the console should clear like it does but put the next line at the top of the screen.
Actual behavior
Used SSH to log into a piece of hardware running linux. When I ran the reset command it clears the screen but adds a blank new line above the terminal line. resizing the terminal from full screen to partial screen then back to full screen does remove some new lines. Seen in Power shell and Ubuntu terminal.


The text was updated successfully, but these errors were encountered: