Fix vertical fore-back coloring when span is empty

e.g. back-to-back color codes, or color code at end of line
This commit is contained in:
Teoh Han Hui 2024-07-28 06:40:46 +08:00
parent 2865ee7131
commit 00369355e6
No known key found for this signature in database
GPG key ID: D43E2BABAF97DCAE

View file

@ -230,6 +230,11 @@ impl NormalizedAsciiArt {
);
},
};
if span.is_empty() {
continue;
}
let txt = &line[span];
if fg.contains(&neofetch_color_idx) {