viewport: ANSI color information seems to be bleeding into surrounding text
Describe the bug Color highlighting in the viewport bubble seems to be getting messed up when the content has ANSI color codes (like those generated using chroma). This seems to be the case regardless of whether "high performance rendering" mode is ON or OFF (although the way the color highlighting breaks seems to be different between the two). Maybe I'm missing something super obvious, but, for the life of me, I couldn't figure out how to get it working.
Setup Please complete the following information along with version numbers, if applicable.
- OS: macos Sonoma (
14.1.2) - Shell: zsh
5.9 - Terminal Emulator: alacritty
0.13.2 - Terminal Multiplexer: tmux
3.4(also reproducible without tmux) - Locale: en_US.UTF-8
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/dhth/bbteavpdemo
go build ../bbteavpdemo -lib=btea- Scroll around for a bit; color highlighting breaks every now and then.
./bbteavpdemo -lib=btea -hp(for high performance rendering mode)- Scroll around for a bit; color highlighting breaks every now and then.
./bbteavpdemo -lib=tview(to compare behaviour with tview)- Scroll around for a bit; color highlighting seems to work as expected.
Source Code https://github.com/dhth/bbteavpdemo
Expected behavior ANSI color highlighting should not bleed into surrounding text.
Screenshots
Here's a video demonstrating the issue.
Love what y'll do; thanks in advance!