zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

High cpu usage and autosuggestions freezes on make command

Open Cryptiiiic opened this issue 3 years ago • 1 comments

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

  • OS + distribution: macOS 12.5 Monterey
  • Zsh version: 5.8.1
  • Plugin version: a411ef3e0992d4839f0732ebeb9823024afaaaa8

Additional context

Cryptiiiic avatar Aug 03 '22 05:08 Cryptiiiic

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

vikram-ray avatar Oct 12 '23 17:10 vikram-ray