charmbracelet / lipgloss

Style definitions for nice terminal layouts 👄
MIT License
8.03k stars 228 forks source link

Example program outputs broken escape codes in Alacritty #5

Closed b0o closed 3 years ago

b0o commented 3 years ago

When running the example program under Alacritty, some gibberish escape codes are printed at the beginning of the output:

2021-04-03_21-18-11_100001:lg:1

In the screenshot, I am running Alacritty in the left pane and Kitty in the right.

I'm not sure if this is an issue with the example program or the library itself. Other than the extraneous escape codes, both outputs look identical (and very cool!)

$ alacritty --version
alacritty 0.8.0-dev (d5dd009a)
muesli commented 3 years ago

Hey @b0o! Thanks for the report. We've tested this with v0.7.2 of alacritty and couldn't reproduce it. Could you do us a favor and verify it on your system with that release of alacritty, as well? If it's still broken, we need to dig deeper, otherwise it sounds like a recent regression in alacritty.

Thank you!

b0o commented 3 years ago

I also cannot reproduce in Alacritty v0.7.2. I ran a git bisect and identified https://github.com/alacritty/alacritty/commit/530de00049c2afcc562d36ccdb3e6afa2fe396a5 as the first bad commit.

What's a bit odd is that in the many hours I've spent in numerous TUI applications (vim, neovim, neomutt, top, htop, gotop, wifi-menu, hecate) in versions of Alacritty containing that commit, I've only noticed this issue happening with the Lipgloss example program.

I have opened an issue with Alacritty: https://github.com/alacritty/alacritty/issues/4941.

meowgorithm commented 3 years ago

Thanks for looking into this, @b0o. Just a note that it’s almost certainly related to the background color detection we’re doing in Termenv.

meowgorithm commented 3 years ago

Hey @b0o! So this appears to be fixed (per https://github.com/alacritty/alacritty/issues/4941 and https://github.com/alacritty/alacritty/pull/4988). I've verified on my end in Alacritty built against https://github.com/alacritty/alacritty/commit/28abb1f9c78ab316126bdf94e2ca12f034f1d8fd, but feel free to re-open if you're still seeing the issue.

And thanks for trying out Lip Gloss!

b0o commented 3 years ago

@meowgorithm Yes, it looks perfect now!