Repository navigation
[Bug] Background color bleeds on soft-wrapped lines after scroll #12497
Issue DescriptionGhostty corrupts ANSI background color rendering when lines with multiple background colors scroll from the visible area into the scrollback buffer. After the scroll occurs, background colors on soft-wrapped lines bleed past This came to my attention when I used a powerline preset for the starship shell prompt. it is particularly annoying there with small terminal windows.
Expected BehaviorLines render identically regardless of whether they are in the visible area or have scrolled into the scrollback. Actual Behavior
Reproduction Steps
Ghostty LogsNo response Ghostty VersionOS Version InformationLinux 6.18.21 #1-NixOS SMP PREEMPT_DYNAMIC x86_64 (Linux only) Display ServerWayland (Linux only) Desktop Environment/Window ManagerGNOME (Wayland) Minimal Ghostty Configuration# no config/standard configAdditional Relevant ConfigurationNo response I acknowledge that:
|
Replies: 3 comments 6 replies
|
can reproduce on macos |
|
I have new insights. This does not seem to be specific to ghostty, but it is also not universal. Perhaps a common faulty ANSI code implentation issue? Is this a bug worth submitting elsewhere, or is this just an ANSI quirk that sometimes happens that i have to deal with? especially because it happens in xterm, perhaps this is just an old unix quirk one has to deal with? The bug is reproducible in:
This bug is not an issue in:
|
|
ok, i found the issue, it has to do with
|


Not an expert, but it reads to me that "correctness" isn't really the best word to use here? As the ncurses FAQ points out, the ECMA-48 standard itself is already not precise/prescriptive enough, so it's really up in the air as to what any terminal emulator should do. (The physical terminals most of us are emulating, namely VT100 and VT220s, don't deal with this, since they do not have color support as mentioned in the above sources.)
From our perspective, Ghostty's behavior is defined in terms of (in order of priority) what is specified in the ECMA-48 spec/other written specs for protocols from other terminal emulators e.g. Kitty (which as established is basically unspecified), then xter…