Skip to content

ConsoleRenderer uses terminal.widht as value for height #164

@lelutin

Description

@lelutin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions