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

command highlighted with dark background after completion start #913

Open
quicknir opened this issue Jan 10, 2023 · 1 comment
Open

command highlighted with dark background after completion start #913

quicknir opened this issue Jan 10, 2023 · 1 comment

Comments

@quicknir
Copy link

With just the following .zshenv and no other z dot files:

source "/home/nir/config/terminal/prezto/modules/syntax-highlighting/external/zsh-syntax-highlighting.zsh"

ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern root)
ZSH_HIGHLIGHT_STYLES[builtin]='bg=yellow'
ZSH_HIGHLIGHT_STYLES[command]='bg=yellow'
ZSH_HIGHLIGHT_STYLES[function]='bg=yellow'

I see a very strange issue with syntax highlighting. If I type "cd" it syntax highlights correctly, but then after I hit space and tab and begin auto completion, it changes the background of "cd" to a very dark color. Then if I hit backspace, it re-highlights it correctly.

I run a solarized theme, if that matters. Whatever color I set it to above, it highlights it correctly, but then after auto completion starts it always goes to black.

Help appreciated!

I tested this on an ubuntu box with zsh 5.6 and cannot duplicate it; the original problem occurs on WSL, running zsh 5.8.1. The behavior can be reproduced with the default windows terminal emulator, and VsCode's. So I don't think this is a terminal emulator issue.

@danielshahaf
Copy link
Member

What are the values of $ZSH_HIGHLIGHT_REVISION and $ZSH_HIGHLIGHT_VERSION?

With just the following .zshenv and no other z dot files:

Are there any global dotfiles (usually named /etc/zsh*)?

after I hit space and tab and begin auto completion, it changes the background of "cd" to a very dark color

After which of the three operations here (hit space, hit tab, "begin auto completion" which may or may not be the same thing as the preceding one) does it turn dark?

If you change bg=yellow to, say, fg=green, does it still turn the same dark color?

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