You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If anything is bound to ^J, and the completion strategy is active for zsh-autosuggestions, then if you quickly type an auto completion, backspace, type more, backspace, etc, you'll see that whatever ^J is bound to gets called quite often.
touch ~/log.txt. Now, if you start typing say cd Do and zsh-autosuggestions suggests "wnloads", I type wn, then backspace, then w, then backspace, etc. Just keep typing some of the suggestion and backspacing without accepting it. After doing this for a bit, you'll see that ~/log.txt has lots of lines of hello in it.
Desktop
Ubuntu 22.04.5 LTS (running on WSL)
zsh 5.9
I tried both 0.7.0 and 0.7.1 and saw the same behavior on both.
The text was updated successfully, but these errors were encountered:
An addendum to my previous post - the way I actually noticed this is that I have a fzf command bound to ^J. So when this issue happens now, suddenly while I'm typing an empty fzf window pops up, which is obviously very disruptive. I never had this issue in the past, so I was a bit confused as to what triggered it (I quickly investigated and discarded that it was the zsh autosuggestions upgrade from 0.7.0 to 0.7.1).
It occurred to me though that maybe this was always happening in the past on zsh-autosuggestions end, but for some reasons, it didn't actually fire the fzf widget. I reset my dotfiles to an earlier state and this is exactly what I found. With my full setup from a couple weeks ago, if I define blub as above and set things up, I still see hello getting pumped into ~/log.txt, which AFAICS seems to be a bug with autosuggestions.
The change happened when I switched from the fzf-tmux script, to using fzf --tmux, with --tmux in the FZF_DEFAULT_OPTS in particular. Something about running fzf-tmux, or fzf without --tmux, seems to work such that if its called from autosuggestions it "fails gracefully" and I don't notice it occurring. But with fzf --tmux, I get the situation previously described. I can add the flag --exit-0 to my FZF_DEFAULT_OPTS, and this seems to basically bring the same behavior to fzf --tmux, albeit with a bit of a noticeable flicker.
I don't really want to have --exit-0, or to have that flicker of course. I still do think this is a bug with zsh autosuggestions; I don't think it should randomly invoke widgets bound to ^J.
quicknir
added a commit
to quicknir/nikud
that referenced
this issue
Nov 29, 2024
Describe the bug
If anything is bound to ^J, and the completion strategy is active for zsh-autosuggestions, then if you quickly type an auto completion, backspace, type more, backspace, etc, you'll see that whatever ^J is bound to gets called quite often.
To Reproduce
Steps to reproduce the behavior:
Have this in your .zshrc
touch ~/log.txt. Now, if you start typing say
cd Do
and zsh-autosuggestions suggests "wnloads", I type wn, then backspace, then w, then backspace, etc. Just keep typing some of the suggestion and backspacing without accepting it. After doing this for a bit, you'll see that ~/log.txt has lots of lines of hello in it.Desktop
The text was updated successfully, but these errors were encountered: