Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crayon fails to detect correct number of terminal colors in Rstudio #56

Closed
s-fleck opened this issue Aug 25, 2017 · 2 comments
Closed

Comments

@s-fleck
Copy link

s-fleck commented Aug 25, 2017

crayon::num_colors() sometimes returns just 1, which causes undesired results with make_style(). The error occurs for me after building a package with ctrl+shift+b, though I do not know if this is consistent way to reproduce the error.

Using crayon::num_colors(forget = TRUE) always returns the correct number of colors. Maybe this should be the default?

I am using Rstudio Version 1.1.338

@gaborcsardi
Copy link
Member

We cannot make forget = TRUE the default, because it is slow.

This probably happens because crayon is loaded from an R profile, and at this point, rstudioapi is not ready to let crayon know about the color support. We'll try to work around this with the RStudio IDE team.

@gaborcsardi
Copy link
Member

I think this is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants