Closed Sonico98 closed 1 year ago
It would be much easier to debug if you were able to reduce the problem to a minimum reproducing example.
As it is, I’m inclined to blame the issue on excessive ricing :stuck_out_tongue:
I have this issue too, but without Powerlevel10k.
I have this issue too, but without Powerlevel10k.
What's your setup? I've tried creating a minimum reproducing example but P10k's code is so inmensely huge I couldn't figure anything out
zsh, and starship prompt, and nothing else
You just need to have color scape codes in the terminal that the selection gets all bogus. I can reproduce this with a simple ls --color=always
.
The case of the video, is not even P10K that is causing that, is most likely the syntax highlight plugin that add the color escape codes to the command line, and P10K is happy to use it as it is.
Nope, ls --color=always
does not do that for me. ls --hyperlink=always
does though. I will add something to filter out OSC sequences in the near but not immediate future. (Note to self: the function to modify is unstyled
, and please do something about tab characters, too.)
Anyway, you guys who have the issue should tell me which escape sequences you use. If you can reproduce it with a shell command, pipe that command through xxd -g1
or od -t x1
or even just cat -A
, and post the output as a code block or a file attachment.
You are correct. I did not realize I had that on my alias. Also, I noticed that any Kitty shell integration escape character causes problem. I wouldn't be surprised to know that all OSC sequences need to be filtered.
@Sonico98 @ljcolling @Townk Please try with current master. If something is still off with your shell prompts, post your output of echo $PS1 | cat -A
.
The last change resolved the issue for me. I tested with different utilities and, with the shell integration turned on, on Kitty.
I can consider this issue resolved.
Sorry for the late reply, I can confirm there are no problems now as well. Also sorry for the lack of help in debugging this, as I didn't really know where to go. Thanks a lot!
https://user-images.githubusercontent.com/61394886/210804264-50effadc-217b-48ce-812b-0e4347393c18.mp4
The selection doesn't really match what's shown on screen wherever special characters are present. Using the default zsh configuration (no themes) works flawlessly.