Skip to content

Commit

Permalink
Don't print values in magenta
Browse files Browse the repository at this point in the history
This fixes the opening bracket of lists/attrsets being printed in
magenta, unlike the closing bracket.

NixOS#9753 (comment)
  • Loading branch information
9999years committed Feb 4, 2024
1 parent 49cf090 commit e351f5e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libexpr/print.cc
Original file line number Diff line number Diff line change
Expand Up @@ -511,4 +511,15 @@ std::ostream & operator<<(std::ostream & output, const ValuePrinter & printer)
return output;
}

/**
* `ValuePrinter` does its own ANSI formatting, so we don't color it
* magenta.
*/
template<>
hintformat & hintformat::operator%(const ValuePrinter & value)
{
fmt % value;
return *this;
}

}

0 comments on commit e351f5e

Please sign in to comment.