bubbles icon indicating copy to clipboard operation
bubbles copied to clipboard

viewport: ANSI color information seems to be bleeding into surrounding text

Open dhth opened this issue 1 year ago • 0 comments

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:

  1. Clone https://github.com/dhth/bbteavpdemo
  2. go build .
  3. ./bbteavpdemo -lib=btea
  4. Scroll around for a bit; color highlighting breaks every now and then.
  5. ./bbteavpdemo -lib=btea -hp (for high performance rendering mode)
  6. Scroll around for a bit; color highlighting breaks every now and then.
  7. ./bbteavpdemo -lib=tview (to compare behaviour with tview)
  8. 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. image

Love what y'll do; thanks in advance!

dhth avatar May 25 '24 18:05 dhth