File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## Unreleased
9
+
10
+ ### Fixed
11
+
12
+ - Fix auto detection of terminal size on Windows https://github.com/Textualize/rich/pull/2916
13
+
8
14
## [ 13.3.4] - 2023-04-12
9
15
10
16
### Fixed
@@ -52,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
52
58
- Fixed failing tests due to Pygments dependency https://github.com/Textualize/rich/issues/2757
53
59
- Relaxed ipywidgets https://github.com/Textualize/rich/issues/2767
54
60
55
- ### Added
61
+ ### Added
56
62
57
63
- Added ` encoding ` parameter in ` Theme.read `
58
64
Original file line number Diff line number Diff line change @@ -67,5 +67,6 @@ The following people have contributed to the development of Rich:
67
67
- [ Adrian Zuber] ( https://github.com/xadrianzetx )
68
68
- [ Ke Sun] ( https://github.com/ksun212 )
69
69
- [ Qiming Xu] ( https://github.com/xqm32 )
70
+ - [ L. Yeung] ( https://github.com/lewis-yeung )
70
71
- [ James Addison] ( https://github.com/jayaddison )
71
- - [ Pierro] ( https://github.com/xpierroz )
72
+ - [ Pierro] ( https://github.com/xpierroz )
Original file line number Diff line number Diff line change @@ -1005,19 +1005,13 @@ def size(self) -> ConsoleDimensions:
1005
1005
width : Optional [int ] = None
1006
1006
height : Optional [int ] = None
1007
1007
1008
- if WINDOWS : # pragma: no cover
1008
+ for file_descriptor in _STD_STREAMS_OUTPUT if WINDOWS else _STD_STREAMS :
1009
1009
try :
1010
- width , height = os .get_terminal_size ()
1010
+ width , height = os .get_terminal_size (file_descriptor )
1011
1011
except (AttributeError , ValueError , OSError ): # Probably not a terminal
1012
1012
pass
1013
- else :
1014
- for file_descriptor in _STD_STREAMS :
1015
- try :
1016
- width , height = os .get_terminal_size (file_descriptor )
1017
- except (AttributeError , ValueError , OSError ):
1018
- pass
1019
- else :
1020
- break
1013
+ else :
1014
+ break
1021
1015
1022
1016
columns = self ._environ .get ("COLUMNS" )
1023
1017
if columns is not None and columns .isdigit ():
You can’t perform that action at this time.
0 commit comments