-
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
redrawhook: Effect on third-party plugins #735
Comments
It's not pretty, but it's possible to add a noop highlight (e.g. |
Nice ☺ In addition to So, here are magic numbers for us: % perl -E 'print map "$_ ", reverse sort { $a <=> $b } map { int rand (1<<31) } qw/start end/; print join ",", map { "$_=" . int rand (1<<8) } qw/fg bg/; say join "", map ",$_", grep { int rand 2 } qw/bold standout underline/'
1037776018 929459019 fg=100,bg=191,underline However, I would prefer to start by implementing "If |
Complete agreement on the plan. Just giving a fallback. I kinda thought the 16 bits of fg and bg values would have been sufficient. I don't think there are even 256 region_highlight modifying zsh plugins much less 65 thousand. |
To a cryptographer, using an order of magnitude more bits of key space than conceivably required is second nature :P But yeah, we can leave some of the bits as "reserved, must be set to zero". How about leaving (I suppose this is how the designers of IPv6's address space must've felt.) |
Fixes #579 (zsh-autosuggestions interoperability). Fixes #735 (ditto). See #579 (comment) See zsh-users/zsh-autosuggestions#529 (comment)
Implemented; see #579 (comment). |
@ericfreese points in zsh-users/zsh-autosuggestions#529 (comment) that merging feature/redrawhook will break not only zsh-autosuggestions (#579) but possibly other plugins as well.
In a nutshell, suppose that with today's versions of everything (zsh, z-sy-h, and the third-party plugin) the third-party plugin wraps widgets and adds to region_highlight after z-sy-h runs. Once z-sy-h begins to use redrawhook, z-sy-h's hook will run after the third-party widget wrapper, and without the proposed
region_highlight
owner=
feature (zsh-users/zsh#57) will trigger issue #418.Brainstormed solutions include:
owner=
functionality is availableregion_highlight
entries (see next comment)Between the two options listed thus far, I would vote for the second. It's not ideal but it avoids breakage for users who also use third-party plugins until those upgrade to pre-redrawhook as well.
Does anyone see a third option?
The text was updated successfully, but these errors were encountered: