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

Allow wrapping widgets whose name start with _ (underscore) #749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toadjaune
Copy link

Hi folks,

When creating a zle widget whose name starts with _, it is ignored by zsh-autosuggestions, leading to various situations where the suggestion should be refreshed, but isn't.

Typically, other plugins often create such widgets, making them incompatible with zsh-autosuggestions.

This PR changes this.

Preliminary testing seems to indicate everything works fine on my machine, and before going through more extensive testing and/or writing tests, I wanted to ask if there's a specific reason to forbid wrapping such widgets.

It looks like the current presence check is not a mistake, but a voluntary design, but I can't understand why. As far as I can tell, the only reason to ban such widget names, is to prevent wrapping an already-wrapped widget.
Which the proposed change still does.

#737 is a manifestation of this issue, and provides a nice minimal reproducing example (although the problem is bigger than stated there, as it affects all types of widget wrapping)

If we go through with this change, it would likely require a 0.8.0 tag, as suddenly starting to wrap previously-unwrapped widgets may break unexpectedly on specific edge cases. It is however possible for users with such a setup to reproduce the current behavior with ZSH_AUTOSUGGEST_IGNORE_WIDGETS, so, it's not a blocking change.

Please let me know if I've missed the rationale behind the current design !

@norman-zon
Copy link

Any chance of having this merged an released soon?

@norman-zon
Copy link

bump?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants