File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,18 @@ def apply_workaround(params: RichLibWindowsParams):
35
35
to apply the the workaround for the rich library."""
36
36
assert params .IsInitialized , params
37
37
38
- # This takes care of the table graphic box.
39
- # https://github.com/Textualize/rich/issues/3625
38
+ # -- This takes care of the table graphic box.
39
+ # -- See https://github.com/Textualize/rich/issues/3625
40
40
sys .stdout .reconfigure (encoding = params .stdout_encoding )
41
41
42
42
# This enables the colors.
43
- # https://github.com/Textualize/rich/issues/3082
43
+ # See https://github.com/Textualize/rich/issues/3082
44
+
45
+ # -- Make sure that _windows_console_features is initialized with cached
46
+ # -- values.
47
+ rich .console .get_windows_console_features ()
44
48
assert rich .console ._windows_console_features is not None
49
+
50
+ # -- Apply the patch.
45
51
rich .console ._windows_console_features .vt = params .vt
46
52
rich .console ._windows_console_features .truecolor = params .truecolor
You can’t perform that action at this time.
0 commit comments