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 such widget `.manydots-magic.orig.backward-delete-char' #2

Open
Jomik opened this issue Feb 21, 2017 · 16 comments
Open

No such widget `.manydots-magic.orig.backward-delete-char' #2

Jomik opened this issue Feb 21, 2017 · 16 comments

Comments

@Jomik
Copy link

Jomik commented Feb 21, 2017

I am getting this issue after using zplug to load your code whenever I hit backspace.
No such widget `.manydots-magic.orig.backward-delete-char'
My config can be found here https://github.com/Jomik/dotfiles/blob/c92f8f78dabcb47bd275c90345907be3e26131db/home/zshrc

EDIT: Refer to actual commit and not master, for later usage if needed.

@mavam
Copy link

mavam commented Jun 18, 2017

Looks like you're loading the plugin via zplug, Adding defer:2 fixed it for me:

zplug 'knu/zsh-manydots-magic', use:manydots-magic, defer:2

@knu
Copy link
Owner

knu commented Jun 19, 2017

I'm not using zplug. Is there anything I can do in manydots-magic?

@mavam
Copy link

mavam commented Jun 19, 2017

Good question. The error message that crept up was probably occurring due to the order of how packages are loaded. The defer directive changes that order. In the README, you write:

If you are enabling url-quote-magic, make sure to load url-quote-magic first and then load manydots-magic.

I assume that this was the culprit.

@Jomik
Copy link
Author

Jomik commented Jun 19, 2017

@mavam I wasn't enabling url-quote-magic at the time.
I've however gone to using fish shell now.

@Virako
Copy link

Virako commented Oct 22, 2020

@twang817
Copy link

twang817 commented Dec 23, 2021

I've solved this problem for myself by loading it after zsh-autosuggestions:

zinit wait'0c' for \
    atload'_zsh_autosuggest_start' zsh-users/zsh-autosuggestions \
    pick'manydots-magic' compile'manydots-magic' knu/zsh-manydots-magic \
    ;

EDIT: I actually think this may be in conflict with fast-syntax-highlighting, not zsh-autosuggestions.

@protist
Copy link

protist commented Feb 14, 2022

It looks like the recent zsh update to 5.8.1 has broken this for me too. Every time I press backspace, I get the same error and cannot delete text. I tried reverting to zsh 5.8 and backspace works perfectly again.

I'm not using zplug or url-quote-magic. I don't really understand either fix proposed by the two previous commentors, but this might be something new and unrelated anyway.

@knu
Copy link
Owner

knu commented Feb 16, 2022

You need to respawn the shell after upgrading zsh as long as you use autoload. It's not specific to this widget.

@protist
Copy link

protist commented Feb 17, 2022

@knu Sorry I'm not entirely sure what you mean. Do you mean if I open a new zsh shell, then it should work fine? If so, this doesn't work for me. I am using the autoload method.

@protist
Copy link

protist commented Feb 17, 2022

I'm also using zim, and I thought I should update reinstall this too. After updating reinstalling, I can use the backspace key fine now (I don't get the error), but backspace just does its "normal" role, and doesn't delete groups of /..

@knu
Copy link
Owner

knu commented Feb 17, 2022

@protist Do you happen to have zsh-autosuggestions installed? I confirmed that zsh-autosuggestions overwrites LASTWIDGET that manydots-magit uses to know if backspace should delete the last /.. part. With it disabled, manydots-magic works fine for me including the backspace behavior.

@knu
Copy link
Owner

knu commented Feb 17, 2022

I think I'll loosen the conditions so that it only checks if LBUFFER ends with ../.. to see if backspace should delete the last /.. part.

@protist
Copy link

protist commented Feb 17, 2022

@knu Yes, that is exactly it! If I disable zsh-autosuggestions, manydots-magic's backspace functionally does indeed work. Thanks for the detective work!

@twang817
Copy link

You guys might take a look at this hack that I did to solve the problem for me:

twang817@6525d31

@protist
Copy link

protist commented Feb 17, 2022

Thank @twang817. I can confirm that with this fork I can both use zsh-autosuggestions and manydots-magic's backspace still works.

archlinux-github pushed a commit to archlinux/aur that referenced this issue Jul 28, 2022
@kergoth
Copy link

kergoth commented May 30, 2023

You guys might take a look at this hack that I did to solve the problem for me:

twang817@6525d31

Just as an FYI, with your fork I get this instead:

_zsh_autosuggest_bound_1_manydots-magic.self-insert:74: maximum nested function level reached; increase FUNCNEST?

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

No branches or pull requests

7 participants