Skip to content
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

ConsoleRenderer uses terminal.widht as value for height #164

Open
lelutin opened this issue Apr 25, 2022 · 0 comments
Open

ConsoleRenderer uses terminal.widht as value for height #164

lelutin opened this issue Apr 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@lelutin
Copy link

lelutin commented Apr 25, 2022

In render/console/init.py, the height property is currently declared as this:

174     @property
175     def height(self):
176         return self.terminal.width or 24

If I instantiate a new ConsoleRenderer, I can confirm that width and height have the same value.

This is surely problematic for the calls to terminal.location that use this property as the basis for the y axis.

One example of function that does not behave properly because of this is ConsoleRenderer.render_in_bottombar. Currently if I just call the following, I'm not seeing the output at all:

from inquirer.render.console import ConsoleRender

cr = ConsoleRender()

cr.render_in_bottombar("meuh")

once the height property is changed to use terminal.height, the message gets printed on the terminal's second to last line.

@Cube707 Cube707 added the bug Something isn't working label Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants