-
Notifications
You must be signed in to change notification settings - Fork 10
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
Using custom colors in the prompt #33
Comments
looks like the prompt length calculator not calculating the color correctly. The calculator should ignore the color chars length. |
Is there a proper way to pass Color to the Styler.init() ? I tried:
but that didn't seem to take despite there being code in the library to handle Color. |
What kind of terminal you use? Is the |
I'm using the default kali terminal. The examples in Edit: zsh version 5.9. It seems nim-noise uses Edit2: Terminal supports true color just fine Final Edit: Okay it turns out I needed to call |
Glad you can solve it |
Using custom colors in the prompt adds dead space at the end of it. This occurs anytime you pass a string with ANSI escape characters in it, and seems to be roughly the length of the escape characters used.
This code:
Results in this output:
I tried another method, by using a Color value directly in the Styler initialization, however it didn't work. I might be reading the source code wrong, but I believe it is supported here (https://github.com/jangko/nim-noise/blob/master/noise/styler.nim#L54). Please let me know if I've misunderstood something.
The text was updated successfully, but these errors were encountered: