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.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## Unreleased
9+
10+ ### Fixed
11+
12+ - Fix auto detection of terminal size on Windows https://github.com/Textualize/rich/pull/2916
13+
814## [ 13.3.4] - 2023-04-12
915
1016### Fixed
@@ -52,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5258- Fixed failing tests due to Pygments dependency https://github.com/Textualize/rich/issues/2757
5359- Relaxed ipywidgets https://github.com/Textualize/rich/issues/2767
5460
55- ### Added
61+ ### Added
5662
5763- Added ` encoding ` parameter in ` Theme.read `
5864
Original file line number Diff line number Diff line change @@ -67,5 +67,6 @@ The following people have contributed to the development of Rich:
6767- [ Adrian Zuber] ( https://github.com/xadrianzetx )
6868- [ Ke Sun] ( https://github.com/ksun212 )
6969- [ Qiming Xu] ( https://github.com/xqm32 )
70+ - [ L. Yeung] ( https://github.com/lewis-yeung )
7071- [ 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:
10051005 width : Optional [int ] = None
10061006 height : Optional [int ] = None
10071007
1008- if WINDOWS : # pragma: no cover
1008+ for file_descriptor in _STD_STREAMS_OUTPUT if WINDOWS else _STD_STREAMS :
10091009 try :
1010- width , height = os .get_terminal_size ()
1010+ width , height = os .get_terminal_size (file_descriptor )
10111011 except (AttributeError , ValueError , OSError ): # Probably not a terminal
10121012 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
10211015
10221016 columns = self ._environ .get ("COLUMNS" )
10231017 if columns is not None and columns .isdigit ():
You can’t perform that action at this time.
0 commit comments