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

wsltty very slow typing/pasting #215

Closed
hsab opened this issue Jan 21, 2017 · 5 comments
Closed

wsltty very slow typing/pasting #215

hsab opened this issue Jan 21, 2017 · 5 comments

Comments

@hsab
Copy link

hsab commented Jan 21, 2017

I'm using wsltty on windows and I have stumbled upon this issue, where pasting is incredibly slow. The problem only persists if the plugin is active.

Furthermore, this problem only exists if the text is copied and pasted using the mouse (or pasted using shft+insert). However if I do ^U on a command, the ^Y operation behaves with acceptable speed.

Also if I hold a key for a long time after release the characters are still registered as input. I assume there is a delay between key registers and input display. Same issue with backspace & delete keys.

Thank you for the wonderful plugin.

PS. I have tested this with bash.exe as well as mintty.

My config file:

autoload -Uz compinit
compinit
export TERM="xterm-256color"
source ~/.aliases

source ~/.antigen/antigen.zsh
antigen use oh-my-zsh

antigen bundle git
antigen bundle command-not-found
#antigen bundle compleat
antigen bundle git-extras
antigen bundle git-flow
antigen bundle npm
#antigen bundle web-search
antigen bundle z
antigen bundle zsh-users/zaw
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
#antigen bundle zsh-users/zsh-history-substring-search

antigen theme bhilburn/powerlevel9k powerlevel9k

antigen apply

bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^R' zaw-history
bindkey -M filterselect '^D' zaw-bookmark-add-buffer


# ZAW UI
zstyle ':filter-select:highlight' matched fg=green
zstyle ':filter-select' max-lines 5

# ZSH Configs
zstyle ':completion:*' menu select
zstyle ':bracketed-paste-magic' active-widgets '.self-*'

# Prevent duplicate commands in the history file
setopt histignoredups

# Set default user
DEFAULT_USER="xxxxxxx"

# 'rm *' warning
setopt RM_STAR_WAIT

# Bash Cms
setopt interactivecomments

# Spell Correct
setopt CORRECT
@hsab hsab changed the title Very slow typing/pasting/backspace wsltty very slow typing/pasting Jan 21, 2017
@ericfreese
Copy link
Member

Sounds like this is very similar to #141. You can try setting the ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE config variable to help. Alternatively, disabling bracketed-paste-magic may help.

@ziggythehamster
Copy link

If wsltty is running zsh under Cygwin, you're probably seeing Cygwin's slow fork() implementation.

My WSL installation is using the normal Ubuntu-supplied zsh and this plugin works fine under it (I am running "bash.exe" under ConEmu). But if I use my Cygwin zsh, this plugin is super slow.

@ericfreese
Copy link
Member

You might try out the develop branch, which implements asynchronous suggestions. But there's still plenty of forking, so not sure if it will address this problem...

@OlivierMary
Copy link

Hi,

I had same problem, the branch develop not working for me, but branch : fixes/slow_bracketed_paste_magic works ;)

cya

Note: for develop branch I have this error on zsh startup :

(zpty):zpty:4: can't open pseudo terminal: bad file descriptor
_zsh_autosuggest_feature_detect_zpty_returns_fd:zpty:12: no such pty command: zsh_autosuggest_feature_detect
(zpty):zpty:12: can't open pseudo terminal: bad file descriptor

@ericfreese
Copy link
Member

I'm going to close this since there hasn't been any activity in such a long time and I believe asynchronous mode will handle this. Suggestions may take a while to show up, but they shouldn't block anything.

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

No branches or pull requests

4 participants