-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
use zle-line-pre-redraw hook if available #261
Conversation
I have my own version of that at master...danielshahaf:mikachu-redrawhook/v2 Differences from your version:
|
Possibly. A zle-isearch-update widget that modifies BUFFER doesn't trigger zle-line-pre-redraw. Raise this subissue on -workers@? |
@m0vie Ping, would you raise the |
I talked to Mikael on IRC and the he said the code was moved to the zle input loop for performance reasons to avoid multiple triggers. Hoewever the input loop is not triggered while minibuffers are active. I raised the issue on -workers@ again. |
At: http://www.zsh.org/mla/workers/2016/threads.html#00092 (workers/37557) |
Once this is done, we can stop requiring that z-sy-h be the last thing sourced in zshrc. (So docs will need to be updated) |
... but we should document instead that z-sy-h registers a |
This should have been fixed in zsh master, see #259 (comment) |
88e0d5b
to
1f9d60c
Compare
Updated the pull request. @danielshahaf I'm still using |
Okay. I mentioned this in workers/37639. About the use of
|
Typo: _zsh_highligh_pre_redraw_wrapper → _zsh_highlight_pre_redraw_wrapper |
You're right, this does not work as intended. I refactored all my branches and I think I now have a solution that fixes all the recent issues we were having. But I'm starting to get really confused with all those open pull requests and issues that depend on each other so I didn't submit yet another, yet. I put everything here in a branch: Maybe we can talk on IRC in the next few days and to go through it so we can close some of those issues? |
Status update: we spoke on IRC and @m0vie will submit the |
860d0c2
to
e3b32de
Compare
@phy1729 points out that I'd like to merge one of the two versions of pre-redraw usage sooner: either just the first and fourth patches out of this PR, or some variant of my version which I linked earlier. |
This patch causes a behaviour difference in the [i257] scenario: - Before this change, the zle_highlight[isearch] is applied and z-sy-h's highlighting isn't. - With this change, both zle_highlight[isearch] and z-sy-h's highlighting are applied, so «echo foo» renders the first word in green underline (fg=green from ZSH_HIGHLIGHT_STYLES[builtin], underline from zle_highlight[isearch]). This patch causes the presuppositional FAQ entry added in a8fe22d to be correct. This is part of #261, of which #288 was a spin-off. [i257] #257 (comment)
Updated the PR. With the new However the |
Closing, since #356 is a better solution. |
The widget binding logic is kept, so that old versions of zsh still work as before.
_zsh_highlight_bind_widgets now accepts parameters, to specify which widgets to bind.
This is needed because with the redraw-hook we are not notifed for zle-isearch-* anymore, but we still need to react on those. Maybe this is an upstream issue?
TODO: The version numer in is-at-least actually needs to be 5.2.1, once officially released.
This fixes #245.