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

No highlighting while cycling menu completion results #375

Closed
m0vie opened this issue Sep 27, 2016 · 25 comments
Closed

No highlighting while cycling menu completion results #375

m0vie opened this issue Sep 27, 2016 · 25 comments

Comments

@m0vie
Copy link
Contributor

m0vie commented Sep 27, 2016

While cycling through results in menu completion, no highlighting is applied:
untitled

  1. No widget is called for current master branch.

  2. zle-line-pre-redraw is not called, either.

Not sure about 1), but 2) can probably be fixed by introducing another redrawhook(); in upstream.

@danielshahaf
Copy link
Member

Patch upstream: workers/39590

@danielshahaf
Copy link
Member

Committed upstream in zsh-users/zsh@5b192a4. @m0vie, I assume we can close this issue, unless there is a z-sy-h side fix that can be done to support older zsh's?

@danielshahaf
Copy link
Member

(To be clear: the upstream patch fixes this issue.)

@m0vie
Copy link
Contributor Author

m0vie commented Oct 19, 2016

Yes, I don't think there is anything we can do to make it work with older versions.

@m0vie m0vie closed this as completed Oct 19, 2016
@ratheesh
Copy link

ratheesh commented Jun 1, 2017

I still observe this issue in zsh v.5.3.1. Can somebody confirm if this is fixed in latest zsh.

@danielshahaf
Copy link
Member

danielshahaf commented Jun 1, 2017

@ratheesh Yes, it's fixed in latest zsh.

@ratheesh
Copy link

ratheesh commented Jun 2, 2017

If I enable menu select using
zstyle ':completion:*:*:*:*:*' menu select,
the functionality breaks. Is this expected?
Is there a setting or workaround to get this working?

@danielshahaf
Copy link
Member

danielshahaf commented Jun 2, 2017 via email

@ratheesh
Copy link

ratheesh commented Jun 3, 2017

@danielshahaf
I am using 5.3.1. But I also tried the latest master(a6135f6) branch. I still see this issue.
I tried zstyle config that you mentioned, I did not see any difference.

@danielshahaf
Copy link
Member

Reopening per @ratheesh's last comment. @ALL Can somebody investigate this?

@danielshahaf danielshahaf reopened this Jun 3, 2017
@danielshahaf
Copy link
Member

(Sorry for shouting. I typed "all" in lowercase; I think it's a github bug.)

@ratheesh
Copy link

ratheesh commented Aug 8, 2017

@m0vie @danielshahaf
I still observe this issue with zsh v.5.4 that was tagged yesterday and latest zsh-syntax-highlighting module.
I am not sure if I am missing something during testing.

@danielshahaf
Copy link
Member

With zsh 5.3.1-test-2-0-gd17f9d32f (similar to 5.4) and autoload compinit; compinit; zstyle :completion:\* menu select and cd /etc/<TAB><TAB><TAB>, the various /etc/foo names being completed are not underlined. However, the trailing slash on dirs is bold.

The fix mentioned about is about zle-line-pre-redraw which is not used by the master branch; it is used by the feature/redrawhook branch, however, the behaviour there is similar to the behaviour on master.

Could somebody please confirm (a) that the above is a valid test case for this issue, (b) that it used to work at one time with some (which?) combination of zsh and z-sy-h?

@m0vie
Copy link
Contributor Author

m0vie commented Aug 12, 2017

This feature only works correctly, if the zle-line-pre-redraw hook is used. It does not work correctly with latest zsh master / z-sy-h master.

About your questions:
(a) Yes, that seems to be a valid test case. The bold trailing slash you are seeing is due to zsh itself (zle_highlight[suffix]).
(b) With zle-line-pre-redraw, this has been working since zsh 5.3.

By the way: I just saw that my comment from June 03 was totally misplaced, that one was about the isearch issue. (I removed it)

@ratheesh
Copy link

ratheesh commented Aug 13, 2017

with zsh 5.4.1 master and z-sy-h feature/redrawhook branch, this feature works fine for me.
I could not test it on zsh 5.3

@ratheesh
Copy link

Just to add, z-sy-h feature/redrawhook branch breaks zsh-autosuggestions plugin highlighting.

@ratheesh
Copy link

may I know if any got a chance look into this.

@danielshahaf
Copy link
Member

Sorry, missed your comments.

with zsh 5.4.1 master and z-sy-h feature/redrawhook branch, this feature works fine for me.

Okay; labeled as such and added to the list in #245. Hopefully redrawhook will be merged for 0.7.0 so this will be fixed then.

Just to add, z-sy-h feature/redrawhook branch breaks zsh-autosuggestions plugin highlighting.

Please test with latest master of both and if it's still a problem, open a new issue. Thanks!

@ColemanGariety
Copy link

I'm experiencing this, which has been an issue for nine years, wow (#25)! What's the latest fix?

@danielshahaf
Copy link
Member

Will be fixed when redrawhook is fixed, hopefully soon. In the meantime you can workaround this by using (or merging) the feature/redrawhook branch.

@nhooyr
Copy link

nhooyr commented May 26, 2020

@danielshahaf Why isn't that branch just merged into master?

I'm seeing this in latest zsh 5.8 from homebrew.

@danielshahaf
Copy link
Member

Because it causes a regression in a certain class of use-cases (see #418 and #579) and we're trying to figure out how to solve that regression without making a change to zsh itself (zsh-users/zsh#57), waiting for the next zsh release, and requiring all users to upgrade to that.

@nhooyr
Copy link

nhooyr commented May 26, 2020

Awesome, thanks for responding!

@nhooyr
Copy link

nhooyr commented Aug 9, 2020

🎉🎉

Congrats guys!

@danielshahaf
Copy link
Member

Thanks :-)

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

5 participants