alacritty: Background sometimes does not show up correctly when it is set to be different than the terminal color

For bug reports, the following information can help speed up the process. Please describe the bug that you have found and what you would expect to happen instead.

Alacritty does not seem to wrap lines consistently when the line’s background is different than the terminal background.

The behavior can be seen in this screenshot

Screenshot from 2021-12-23 16-32-45

As can be seen, I have repeated running the command ls -l in the directory ~/tmp/test. The symlink tf-opt points to a nonexistent location, and so the color of that location is rendered with bold white font on red background. This worked correctly for the first 7 invocations of ls -l. In the 8th run (the last run), the red background extended beyond the length of the location where tf-opt points to. It extends to the width of the terminal window.

Expected behavior

The red background in the above screenshot should stop at the end of the string representing the source location of the symlink.

System

OS: Linux Version: alacritty 0.9.0 Linux/BSD: X11, Budgie

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

For the record, I just checked a few of the Linux terminals I have installed. XTerm, Konsole, Rxvt, st MLTerm, Contour, WezTerm, Hyper, and the Linux console all match Alacritty’s behavior. I know VTE deliberately changed the way they handle BCE a few years back which is why you don’t see this in Gnome Terminal. I expect Kitty just copied what VTE is doing (or vice versa).