zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.57k stars 1.88k forks source link

High cpu usage and autosuggestions freezes on make command #700

Open Cryptiiiic opened 2 years ago

Cryptiiiic commented 2 years ago

Describe the bug

I'm in a makefile project directory, I start typing make then zsh freezes and is at around 60% cpu usage.

To Reproduce

Steps to reproduce the behavior: Enable autosuggestions, enable zdharma/fast-syntax-highlighting, type make inside a makefile project directory.

% zsh -df
% source path/to/zsh-autosuggestions.zsh
% ... # what do you do to reproduce?

zdharma/fast-syntax-highlighting is causing the freeze in autosuggestions with make

Expected behavior

No freeze here

Screenshots

exact line it freezes on:

+ zsh-autosuggestions.zsh:816 @_zsh_autosuggest_async_response:1> emulate -L zsh
+ zsh-autosuggestions.zsh:818 @_zsh_autosuggest_async_response:3> local suggestion
+ zsh-autosuggestions.zsh:820 @_zsh_autosuggest_async_response:5> [[ -z '' ]]
+ zsh-autosuggestions.zsh:822 @_zsh_autosuggest_async_response:7> IFS='' + zsh-autosuggestions.zsh:822 @_zsh_autosuggest_async_response:7> read -rd '' -u 13 suggestion
+ zsh-autosuggestions.zsh:823 @_zsh_autosuggest_async_response:8> zle autosuggest-suggest -- ''
+ zsh-autosuggestions.zsh:830 @_zsh_autosuggest_async_response:15> zle -F 13

Desktop

Additional context

vikram-ray commented 1 year ago

Facing same issue on zsh 5.9 (x86_64-apple-darwin22.0)