Implement Fallback for microsoft's terminals. #138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement Fallback for microsoft's terminals.
I finally got access to a computer using the Microsoft's Windows OS.
That's the opportunity to find and mitigate all the problems
encountered. This patch:
Introduce an option and a C++ definition to enable fallback for
Microsoft's terminal emulators. This allows me to see/test the
Microsoft output from Linux. This also allows Windows users to remove
the fallback and target non Microsoft terminals on Windows if needed.
Microsoft's terminal suffer from a race condition bug when reporting
the cursor position:
Switch all DSR responses to appending instead of prepending microsoft/terminal#7583.
The mitigation is not to ask for the cursor position in fullscreen
mode where it isn't really needed and request it less often.
This fixes: [BUG] Input fields get random symbols like "[B[AA1" or "B" and others pasted in on every action #136
Microsoft's terminal do not handle properly hidding the cursor. Instead
the character under the cursor is hidden, which is a big problem. As
a result, we don't enable setting the cursor to the best position for
input method editors,
It will be displayed at the bottom right corner.
See:
Microsoft's terminals do not provide a way to query if they support
colors. As a fallback, assume true colors is supported.
See issue:
This mitigates:
The "cmd" on Windows do not properly report its dimension. Powershell
works correctly. As a fallback, use a 80x80 size instead of 0x0.
There are several dom elements and component displayed incorrectly,
because the font used is missing several unicode glyph. Use
alternatives or less detailled one as a fallback.