File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ license-files = [
2020dependencies = [
2121 " blessed~=1.33.0" ,
2222 " colorama~=0.4.6 ; platform_system == 'Windows'" ,
23+ " is-legacy-terminal~=1.0.0" ,
2324 " json5~=0.13.0" ,
2425]
2526requires-python = " >=3.8,<4"
Original file line number Diff line number Diff line change 1- import os , sys
1+ import sys
22
3- import blessed
3+ import blessed , is_legacy_terminal
44
55def is_unicode_supported () -> bool :
66 if hasattr (is_unicode_supported , '_cached' ):
77 return is_unicode_supported ._cached
88
9- if sys . platform == 'win32' and not os . environ . get ( 'WT_SESSION' ):
9+ if not is_legacy_terminal (): # type: ignore
1010 is_unicode_supported ._cached = False
11- return False # legacy Win consoles don't suport wide chars
11+ return False # legacy terminals don't suport wide chars
1212
1313 # Measure rendered width of wide CJK char
1414 terminal = blessed .Terminal ()
You can’t perform that action at this time.
0 commit comments