Restore standard widgets to fix segfault when re-sourcing autosuggestions.zsh #85

Merged
merged 1 commit into from Jan 20, 2016

2 participants

@ericfreese
zsh-users member

Adds $ZLE_AUTOSUGGEST_ALL_WIDGETS array which groups self-insert, magic-space, backward-delete-char, and accept-line with other widget arrays for easy looping.

Removes all references to autosuggest-*-orig widgets in favor of the '.'-prefixed names (i.e. .self-insert instead of autosuggest-self-insert-orig)

Extracts widget setup code to two new functions: autosuggest-hook-widgets and autosuggest-restore-widgets

Calls autosuggest-restore-widgets when sourced to fix issue #84.

Tested locally with zsh 5.0.7 and 5.2.

@faceleg faceleg merged commit 7dc9e0f into zsh-users:master Jan 20, 2016
@faceleg

Have the installation / usage instructions changed as well?

What I mean to say is, I want to use this IMMEDIATELY, what do I need to know?

@ericfreese
zsh-users member

Have the installation / usage instructions changed as well?

They shouldn't have changed. It should just work as it did before, but with less segfaults.

But you know, I'm playing with it now, and it definitely seems broken... Maybe not ready to merge just yet.

After working on ericfreese/zsh-autosuggestions though, I'm personally inclined to just go that route instead of messing with fixing this.

@faceleg

If you're saying it is more broken than it was before - I don't believe you.

Want to paste your fork on top of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment