-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
pasting a long string results in a hang and lots of ^G's #219
Comments
I'm actually not quite able to reproduce this. When I have % zsh -f
%% autoload -Uz bracketed-paste-magic
%% zle -N bracketed-paste bracketed-paste-magic
%% source zsh-autosuggestions.zsh
%% <paste> Edit: Looks like I'm able to consistently reproduce this with just the following (no % zsh -f
%% source zsh-autosuggestions.zsh
%% foo() { zle -U - $(printf '%*s' "100" | tr ' ' "a") } # Send 100 "a" chars to the zle input stack
%% zle -N foo
%% bindkey ^T foo
%% <ctrl+T> |
It's a much faster flash w/ the minimum repro. I'll see if I can track down what other bits are exacerbating it. I'm on OS X 10.11 w/ iterm2 3.0.14 and my zshrc is here https://github.com/aaronjensen/dotfiles/blob/master/zshrc (though w/ |
If I add |
I've added this to the todo list for #218. It looks like the |
This sounds great to me. I tried doing it but I had no idea how... I look forward to seeing how you are able to do this so I can learn from you. |
Depends on patch to ZSH from workers/40702: http://www.zsh.org/mla/workers/2017/msg00414.html
[GitHub #219] Intended to be helpful for folks using bracketed-paste-magic and other widgets that use `zle -U`.
Depends on patch to ZSH from workers/40702: http://www.zsh.org/mla/workers/2017/msg00414.html
[GitHub #219] Intended to be helpful for folks using bracketed-paste-magic and other widgets that use `zle -U`.
Depends on patch to ZSH from workers/40702: http://www.zsh.org/mla/workers/2017/msg00414.html
[GitHub #219] Intended to be helpful for folks using bracketed-paste-magic and other widgets that use `zle -U`.
@aaronjensen Added There's also a patch submitted upstream that should allow the plugin to detect if there are characters pending on the input stack via |
Unfortunately, I'm still seeing the slow paste/flash of G's. Maybe I'm doing something wrong?
|
I think pasteinit() {
zle autosuggest-disable
} Then zstyle :bracketed-paste-magic paste-init pasteinit And the same for |
Ah, thanks. That makes it a bit faster it seems, but it still takes more time than w/o it enabled.
|
Also, when it reenables, it autosuggests based on an empty prompt (the |
6e46ac9 should fix this. Not quite sure why it's still slow. Will have to do a little more research into that, but I think I'd be ok releasing as-is now since it does work, it's just a little slow. |
It doesn't actually seem to make much difference, to be honest. W/ One thing I notice as well is that It'd be great if it was instant like it is w/o it, but it's not a huge deal as it is now because it's quite a bit faster than it was pre-async, I think. |
This is on
develop
c9a51e0It's probably related to #141, and setting
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=15
works around it, but it seemed odd and most people won't set that so I thought I'd report it.The text was updated successfully, but these errors were encountered: