New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reset height of children #2043
reset height of children #2043
Changes from all commits
7cd8d57
e4c9fc2
5a3c6e6
b1f02ab
8a44328
0f17da1
79e5f95
ebf4c90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -224,6 +224,16 @@ def update_height(self, height: int) -> "ConsoleOptions": | |||||
options.max_height = options.height = height | ||||||
return options | ||||||
|
||||||
def reset_height(self) -> "ConsoleOptions": | ||||||
"""Resets the height to None. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docstring makes it sound like the method is doing self.height = None
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I had auto-merge on. Feel free to "request changes" if there is a worthwhile change. |
||||||
|
||||||
Returns: | ||||||
~ConsoleOptions: New console options instance. | ||||||
""" | ||||||
options = self.copy() | ||||||
options.height = None | ||||||
return options | ||||||
|
||||||
def update_dimensions(self, width: int, height: int) -> "ConsoleOptions": | ||||||
"""Update the width and height, and return a copy. | ||||||
|
||||||
|
@@ -1245,6 +1255,7 @@ def render( | |||||
f"object {render_iterable!r} is not renderable" | ||||||
) | ||||||
_Segment = Segment | ||||||
_options = _options.reset_height() | ||||||
for render_output in iter_render: | ||||||
if isinstance(render_output, _Segment): | ||||||
yield render_output | ||||||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly an issue but just curious - is this some markdown formatter thing that caused this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that may have been vscode. I need to put it inside backticks.