gyscos / cursive

A Text User Interface library for the Rust programming language
MIT License
4.3k stars 245 forks source link

Dialog glitch with pancurses backend on Alacritty #446

Open HenryTheCat opened 4 years ago

HenryTheCat commented 4 years ago

I am reporting a bug. Specifically, it's a graphical glitch that happens only under specific conditions.

Problem description

The border of the dialog view will render incorrectly and produce glitches at the end of the line.

    siv.add_layer(
        Dialog::new()
            .title("A dialog")
            .content(TextView::new_with_content(TextContent::new(
                "Some text"
            )))
            .button("Back", |s| {
                let _ = s.pop_layer();
            }),
    )

Environment

gyscos commented 4 years ago

Thanks for the report! Will investigate.

gyscos commented 4 years ago

Arf cannot reproduce here - it works fine locally, using current cursive master and current alacritty git master:

% alacritty --version
alacritty 0.5.0-dev (f48c43f4)

Screenshot from 2020-04-24 11-56-33

Also tried it with alacritty 0.4.2, same result.

Might be a macOS-specific issue? Are you sure your locale is valid? (It's a common issue). Can you post a screenshot of the issue?

HenryTheCat commented 4 years ago

Here it is:

Screen Shot 2020-04-24 at 15 04 04

I also found out it doesn't happen when I run it from inside tmux.

PS: the '#' shold have been printed in a different position, approximately under the dialog on the right.

gyscos commented 4 years ago

Woo it does look pretty messed up. Does it happen with every example from the repo? What is your $TERM env variable?

HenryTheCat commented 4 years ago

Does it happen with every example from the repo?

I tested a few, and all of them have issues:

Screen Shot 2020-04-24 at 15 50 12 Screen Shot 2020-04-24 at 15 50 37 Screen Shot 2020-04-24 at 15 50 57 Screen Shot 2020-04-24 at 15 51 51

What is your $TERM env variable?

alacritty

gyscos commented 4 years ago

Do you know if it only affects the pancurses backend?

HenryTheCat commented 4 years ago

pancurses and ncurses, it appears; termion, crossterm and bearlibterminal works fine.