Skip to content

Commit

Permalink
Always use style color for plain text
Browse files Browse the repository at this point in the history
Before this change, it only worked on 16M color terminals.

After there's a Chroma release with
alecthomas/chroma#869 in it we should revert
back to "None" here and use the new Chroma release instead.
  • Loading branch information
walles committed Oct 14, 2023
1 parent ae34878 commit cbbdaf6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion m/pager.go
Expand Up @@ -450,7 +450,12 @@ func (p *Pager) initStyle() {

stringBuilder := strings.Builder{}
err := (*p.ChromaFormatter).Format(&stringBuilder, p.ChromaStyle, chroma.Literator(chroma.Token{
Type: chroma.None,
// FIXME: They Type here should really be None. "Background" is a
// workaround until we can bump Chroma to a release with this change in
// it:
// https://github.com/alecthomas/chroma/pull/869
Type: chroma.Background,

Value: "XXX",
}))
if err != nil {
Expand Down

0 comments on commit cbbdaf6

Please sign in to comment.