-
Notifications
You must be signed in to change notification settings - Fork 67
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 console errors #457
Fix console errors #457
Conversation
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.
Looks good!
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.
Looks good!
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.
Looks good!
* Fix console errors * Tweaking test code
Fixes #443.
See #443 (comment) for details on the specific problems in HttpRepl and microsoft/terminal#8312 for some background on why the issues show up differently (or not at all) in different terminals.
Essentially, HttpRepl tied the caret position on the input buffer to the caret position of the console window in a way that causes problems in virtual terminals (e.g. Windows Terminal). Not all terminals were impacted the same way, though all variants other than vanilla cmd.exe had problems.
To fix this, we "disconnect" the cursor position in the console window from the cursor position in the input buffer, but still move them together when appropriate. The concept of the
CaretPosition
is moved from the ConsoleManager to the InputManager (since it tracks with the input buffer more directly than it does with the console cursor) and the CaretUpdateScope concept is removed completely.One thing we are lacking, that this PR does not address, is the ability to actually drive the console output of various consoles to ensure the input buffer caret and the console caret track properly when they're supposed to.