Repository navigation
Avoid DECRQM and DECRQSS queries on Terminal.app - #417
Merged
Merged
Conversation
Avoid DECRQM and DECRQSS queries on Apple's Terminal.app. This requires mixing in an 'XTVERSION' query for get_decrqss(), and get_dec_mode().
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #417 +/- ##
==========================================
+ Coverage 97.45% 97.72% +0.27%
==========================================
Files 13 13
Lines 4044 4052 +8
Branches 736 739 +3
==========================================
+ Hits 3941 3960 +19
+ Misses 83 71 -12
- Partials 20 21 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Terminal.app has "leaky output", it fails to parse some VT100 control codes and displays their contents, this can create "garbage output" to a screen and confuse a user. The API's are meant to be non-destructive and should not forward the cursor as it does.
And so, if TERM_PROGRAM environment variable matches Apple_Terminal, or, delayed XTVERSION query result is the same, then, we return False for any capability that intends to use control codes known to leak.
This has the disadvantage of "slowing down" and slightly modifying behavior of existing queries, that these queries now also contain an XTVERSION query for
get_decrqss(), andget_dec_mode(), where previously they did not, and they did not previously suffer that. The results are cached, and so subsequent checks of terminal program name will not incur further queries.