Skip to content

Commit

Permalink
Potential fix for #438
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Aug 30, 2022
1 parent c1660de commit 6fc8122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff-so-fancy
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ sub git_ansi_color {
# It's a simple 16 color OG ansi
} elsif ($fg) {
my $bright = $fg =~ s/bright//;
my $color_num = $colors->{$fg} + 30;
my $color_num = ($colors->{$fg} // 0) + 30;

if ($bright) { $color_num += 60; } # Set bold

Expand All @@ -952,7 +952,7 @@ sub git_ansi_color {
# It's a simple 16 color OG ansi
} elsif ($bg) {
my $bright = $bg =~ s/bright//;
my $color_num = $colors->{$bg} + 40;
my $color_num = ($colors->{$bg} // 0) + 40;

if ($bright) { $color_num += 60; } # Set bold

Expand Down

0 comments on commit 6fc8122

Please sign in to comment.