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

Output gets corrupted if content cannot fit the terminal #115

Open
maciejmatczak opened this issue Aug 5, 2021 · 4 comments
Open

Output gets corrupted if content cannot fit the terminal #115

maciejmatczak opened this issue Aug 5, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@maciejmatczak
Copy link

maciejmatczak commented Aug 5, 2021

Hi there! First - thanks for that library.

To the business though. With that example:

import inquirer


if __name__ == "__main__":
    choices = [
        ('1 asdfsadf asdf asdf asf as fdaf asf as fasf asf', '1'),
        ('jljl jl jkl;kjl;jk l;jk ;lj ;ljkl;kj l;j kl;jl;jl jl; ', '2'),
        ('reqwerqew r qwer qwerwqr qwr eqwr werqrqwer w qer qr ', '3'),
    ]

    answers = inquirer.list_input(choices)

    print(answers)

... when the terminal is shorter than the the content, the output gets corrupted:

Header not fitting:

image

Header and choices not fitting:

image

It seems like the choices can be nicely wrapped and doesn't get corrupted. So it might be a header problem only. Checked that on unix bash, tcsh and on windows with their new terminal...

Duplicate of #26

@etienne-monier
Copy link

I've got this problem too...

@ashduino101
Copy link

ashduino101 commented Feb 25, 2022

Can confirm this still happens, I can fix it by shortening the strings to the size of the terminal and putting ... after it, but this really only works for certain usage of this package, and in most usage, this wouldn't be a great solution because this is meant for prompts, whereas I'm using it for a selector.

@lelutin
Copy link

lelutin commented Apr 25, 2022

Hi there,

Just wanted to chime in that I'm also seeing the same with the Checkbox question type. With a very quick read of the code, I guess it's the ConsoleRenderer that causes this.

Whenever I move from one line to the other with the cursor, the question (and/or other lines) get repeated above the list.

@Cube707
Copy link
Collaborator

Cube707 commented Dec 18, 2022

Duplicate of #26

@Cube707 Cube707 marked this as a duplicate of #26 Dec 18, 2022
@Cube707 Cube707 added the duplicate This issue or pull request already exists label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants