zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.43k stars 1.85k forks source link

formatting no longer cleared after completion if fg=7 #688

Open xfnw opened 2 years ago

xfnw commented 2 years ago

Describe the bug

after updating to zsh 5.9, the color is no longer cleared after you complete something if you have ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7" set, however it works fine if set to 8

To Reproduce

Steps to reproduce the behavior:

  1. open zsh -df
  2. source zsh-autosuggestions
  3. type ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7" and hit enter
  4. type something and hit enter
  5. type the first letter and then press the right arrow key to accept the completion
  6. notice how the color stays, even if you continue typing

image

Expected behavior

it should clear the formatting after completing like it did on previous zsh versions

image

Desktop

ryanb8 commented 2 years ago

I'm experiencing something similar on mac; however it doesn't seem to be correct or fixed even as I vary my highlight style. On my side, if you type a single letter of the completion it changes the color to look like you've typed the whole thing.

image image

This started after I upgraded to MacOS 12.4. Details:

alexandremjacques commented 2 years ago

Having the same issue @ryanb8 have. Same config:

alexandremjacques commented 2 years ago

Having the same issue @ryanb8 have. Same config:

* OS: macOS Monterey 12.4

* zsh 5.8.1 (x86_64-apple-darwin21.0)

* Plugin version: v0.7.0 - [a411ef3](https://github.com/zsh-users/zsh-autosuggestions/commit/a411ef3e0992d4839f0732ebeb9823024afaaaa8)

* iTerm2 Build 3.4.15

Fixed by updating zsh-syntax-highlighting plugin (both are installed).

stefanscheidt commented 2 years ago

Fixed by updating zsh-syntax-highlighting plugin (both are installed).

Does not work for me. Config:

bekker commented 1 year ago

Same issues here (Updating zsh-syntax-highlighting won't fix)

bekker commented 1 year ago

698 seems to be the same issue. The current version of zsh-autosuggestions and zsh 5.9 don't go well together.

I had to set ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=250" to make clearing work.