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

Conflict with zsh-autosuggestions under zsh 5.8 (and only that version) #756

Closed
leon728 opened this issue Aug 9, 2020 · 6 comments
Closed

Comments

@leon728
Copy link

leon728 commented Aug 9, 2020

when loading both (zsh-autosuggestions and zsh-syntax-highlighting), text color of zsh-autosuggestions is not darkgray.
when loading only zsh-syntax-highlighting, evething works fine.
(reference: zsh-users/zsh-autosuggestions#516)

it was caused by latest commit, using 2d60a47 works fine.

@danielshahaf
Copy link
Member

How could zsh-users/zsh-autosuggestions#516 be related to this? It's from March and the latest commit is from yesterday. Furthermore, that issue doesn't mention what branch or tag of zsh-syntax-highlighting was used. I assume you just mean your symptoms are the same as the screenshots in that issue.

The latest commit is the redrawhook merge. This issue was reported before the merge and believed fixed then: see issues #579 and #735. I'll look into this again.

Please report the version numbers of zsh and zsh-autosuggestions.

@leon728
Copy link
Author

leon728 commented Aug 10, 2020

Yes, I mean symptoms are the same as zsh-users/zsh-autosuggestions#516

ZSH version:
zsh 5.8 (x86_64-ubuntu-linux-gnu)

zsh-autosuggestions version:
zsh-users/zsh-autosuggestions@ae315de

zsh-syntax-highlighting version:
2d60a47 : ok
c14fcad : failed

you fixed #579 in cb33cc0
but in my test, 9ce3540 is ok, cb33cc0 failed

reproduce (#579):
exec zsh -f
source path/to/zsh-autosuggestions/zsh-autosuggestions.zsh
source path/to/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
echo one two three
echo # notice that 'one two three' are faint from autosuggestions.

@danielshahaf
Copy link
Member

danielshahaf commented Aug 10, 2020 via email

@danielshahaf
Copy link
Member

Reproduced. I also tried to vary each of the three relevant versions, with the following results:

zsh version z-asug version z-sy-h version behaviour
5.8 ae315ded4dba (== v0.6.4 == current master) c14fcad (current master) 👎 shows "one two three" in white
5.8 ae315ded4dba (== v0.6.4 == current master) c14fcad (current master) + run git revert cb33cc008123 👍 shows "one two three" in grey.
5.8 eff0894a138f (current develop) c14fcad (current master) 👍👎 When I type the first e of the second echo, that e is shown in bold red (z-sy-h's unknown-token) and the remainder of the line is correctly shown in bold black (as a suggestion); however, as soon as I type the following c, the bug resurfaces.
master ae315ded4dba (== v0.6.4 == current master) c14fcad (current master) 👍 The remainder of the line is in grey, regardless of how much of the echo has been typed in.

@danielshahaf
Copy link
Member

So, the problem is that is-at-least 5.8.0.2 returns true on zsh 5.8.

A workaround is to use is-at-least 5.8.0.2 $ZSH_VERSION.0. That does the right thing under { z-asug master, z-asug develop } × { zsh 5.8, zsh master }.

Pushed in 3944a44 and closing as fixed. Reopen if it's not.

@danielshahaf
Copy link
Member

Reported the bug upstream in https://zsh.org/workers/47314. Thanks again for the report, particularly for bisecting it to that specific commit!

@danielshahaf danielshahaf changed the title conflict with zsh-autosuggestions Conflict with zsh-autosuggestions under zsh 5.8 (and only that version) Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants