Open a-kenji opened 2 years ago
What do you mean by "selection characters"?
I update the issue with a screenshot.
Do you mean that the selection doesn't become highlighted?
@tlinford, Yes, exactly!
Hmm, working alright for me. Maybe something theme/color related?
@tlinford, You are right, it is theme/color related. Weird. The colors in my config didn't change at all. I'll update the issue with the theme.
Same on 0.31.3 with the dracula theme:
themes:
dracula:
fg: [248, 248, 242]
bg: [40, 42, 54]
black: [0, 0, 0]
gray: [68, 71, 90]
red: [255, 85, 85]
green: [80, 250, 123]
yellow: [241, 250, 140]
blue: [98, 114, 164]
magenta: [255, 121, 198]
cyan: [139, 233, 253]
white: [255, 255, 255]
orange: [255, 184, 108]
Changing bg to a different color worked for me.
theme: gruvbox-dark
themes:
gruvbox-dark:
bg: [10, 10, 10] # Originally, bg: [40, 40, 40]
red: [204, 36, 29]
green: [152, 151, 26]
yellow: [215, 153, 33]
blue: [69, 133, 136]
magenta: [177, 98, 134]
orange: [214, 93, 14]
fg: [213, 196, 161]
cyan: [104, 157, 106]
black: [60, 56, 54]
white: [251, 241, 199]
Maybe we should update example theme configurations.
We could probably use an entirely separate theme color setting for "selection background"
As was talked about in discord, this happens when the theme's bg
matches the terminal emulator's background color. Basically the selection gets drawn the same color as the existing background and is not visiible.
We could probably use an entirely separate theme color setting for "selection background"
I agree, it may be worth waiting for the upcoming kdl config changes to land first though. (cc @imsnif )
So, right now the themes work as mapping from one color to another a la classic terminal themes. While I'm open to having a conversation to change this to refer to specific UI elements (with all the complexity of custom UIs that will bring), I'm a little hesitant to start mixing these approaches. (eg. by adding a selectionBackground
). I'm afraid this will slowly bring us toward the second approach without proper planning or backwards compatibility.
That being said: I'm not sure I understand why the selection uses the theme background. Wouldn't that by definition create this problem for every theme that uses the background?
That being said: I'm not sure I understand why the selection uses the theme background.
Me neither, but I'm also confused because I couldn't really find it being used for anything else. In any case, with the current theme we have the only other option would be to use one of the defined colors?
Wouldn't that by definition create this problem for every theme that uses the background?
no, it only happens if the theme's background is set to the same color as the terminal emulator's background.
I was finally able to reproduce in alacritty by setting it's colors.primary.background
to the same value as theme.bg
in zellij.
Basic information
zellij --version
: 0.29.0uname -av
: Linux 5.17.3 #1-NixOS SMP PREEMPT Wed Apr 13 17:27:43 UTC 2022 x86_64 GNU/Linuxalacritty
: alacritty 0.10.1 ()When selecting text with a mouse, it is correctly copied, but the selection characters are omitted.
This is an example from outside of zellij. These characters are not displayed inside of zellij, while selecting.
This seems theme related, the theme I use: