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

Colors stopped to work in Completion Selection (raw SGR escape code is rendered instead) #493

Closed
xak2000 opened this issue Sep 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@xak2000
Copy link

xak2000 commented Sep 17, 2023

After updating from 1.5.4 to 1.5.5 CTRL + SPACE autocompletion started to render the SGR escape code of the selected_completion color instead of the color itself.

Example from 1.5.4 after pressing git then CTRL + SPACE:
image

Example from 1.5.5 after pressing git then CTRL + SPACE:
image

Pressing the arrow keys moves 0;38;5;16;48;5;254 to the next item. :)

The relevant part of my clink_settings:

# name: Selected completion color
# type: color
color.selected_completion = sgr 38;5;16;48;5;254
@chrisant996
Copy link
Owner

chrisant996 commented Sep 18, 2023

@xak2000 Thank you for reporting this. I believe you that it's happening for your.

However, I am unable to reproduce that. I don't think the relevant part is the value of color.selected_completion -- I think it's probably related to one or more other settings or .inputrc variables.

So, I need more information to be able to reproduce the problem, so that I can debug it and fix it.
Can you please share your .inputrc file and the full output from clink set?

I thought maybe it's because colored-stats is off in your config (there are no colors in the completion list), but I still can't reproduce it even when I turn off colored-stats.

UPDATE:

I was able to reproduce it using a fresh profile with no .inputrc file. I'll track down what combination of .inputrc configuration variables is falling into this broken state.

@chrisant996 chrisant996 added bug Something isn't working needs more information The issue needs clarifying information and removed needs more information The issue needs clarifying information labels Sep 18, 2023
@chrisant996
Copy link
Owner

Found it and fixed it. Thanks for reporting it!

@xak2000
Copy link
Author

xak2000 commented Sep 18, 2023

Thank you very much!

For the reference, my .inputrc file was almost empty. This is the full file contents:

"\e[B": history-search-forward
"\e[A": history-search-backward

Now I added colored-stats and colored-completion-prefix as well as I think they are good options anyway. Just didn't know they exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants