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

Coloring doesn't change on auto suggestions #789

Open
tomasnorre opened this issue May 15, 2024 · 1 comment · May be fixed by #790
Open

Coloring doesn't change on auto suggestions #789

tomasnorre opened this issue May 15, 2024 · 1 comment · May be fixed by #790
Labels

Comments

@tomasnorre
Copy link

Describe the bug

After updating to Ubuntu 24.04, I don't get color changes anymore on auto-suggestions. See screenshot.

To Reproduce

Steps to reproduce the behavior:

Sorry haven't found a way to reproduce this. But setting it up from scrats on a new VM it's working like expected. So it's probably something local. :(

Expected behavior

I would expect the coloring to change, to the primary color as before the update.

Screenshots

zsh-autosuggestions-coloring

Desktop

I run following versions:

  • Ubuntu 24.04 (Budgie Edition)
  • kitty 0.32.2
  • zsh 5.9
  • oh-my-zsh (commit: b1c5315)
  • zsh-autosuggestion (commit: c3d4e57)
@tomasnorre tomasnorre added the bug label May 15, 2024
ElementW pushed a commit to ElementW/zsh-autosuggestions that referenced this issue May 22, 2024
…s#789

The ZSH manual describes `region_highlight` as being an array in
https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting,
therefore the previous strategy of removing as many characters as the
last suggestion is *not* the way to do it, explaining why it broke on
recent ZSH versions.

Replace this logic with a simple last-element delete.
Keeps the `_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT` variable intact since
there's no downside in tracking its content, as it still used as a
marker for whether a suggestion highlight was applied.
ElementW added a commit to ElementW/zsh-autosuggestions that referenced this issue May 22, 2024
The ZSH manual describes `region_highlight` as being an array in
https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting,
therefore the previous strategy of removing as many characters as the
last suggestion is *not* the way to do it, explaining why it broke on
recent ZSH versions.

Replace this logic with a simple last-element delete. Keeps the
`_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT` variable intact since there's no
downside in tracking its content, as it still used as a marker for
whether a suggestion highlight was applied.
ElementW added a commit to ElementW/zsh-autosuggestions that referenced this issue May 22, 2024
The ZSH manual describes `region_highlight` as being an array in
https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting,
therefore the previous strategy of removing as many characters as the
last suggestion is *not* the way to do it, explaining why it broke on
recent ZSH versions.

Replace this logic with a simple last-element delete. Keeps the
`_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT` variable intact since there's no
downside in tracking its content, as it still used as a marker for
whether a suggestion highlight was applied.
ElementW added a commit to ElementW/zsh-autosuggestions that referenced this issue May 22, 2024
The ZSH manual describes `region_highlight` as being an array in
https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting,
therefore the previous strategy of removing as many characters as the
last suggestion is *not* the way to do it, explaining why it broke on
recent ZSH versions.

Replace this logic with a simple last-element delete. Keeps the
`_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT` variable intact since there's no
downside in tracking its content, as it still used as a marker for
whether a suggestion highlight was applied.
@tomasnorre
Copy link
Author

I can confirm that the PR fixes my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant