Zsh-autocomplete: No completion after clearing command with fast-syntax-highlighting

Created on 3 Sep 2020  路  5Comments  路  Source: marlonrichert/zsh-autocomplete

Describe the bug

With zdharma/fast-syntax-highlighting active, no completion menu shows when removing typed a command without executing and then typing something new. Opening the history menu with the up or down arrow seems to unstuck it.

Issue does not seem to occur with zsh-users/zsh-syntax-highlighting. I actually can reproduce it with zsh-users/zsh-syntax-highlighting as well, just not as consistently.

To Reproduce

$ cd $(mktemp -d)
$ ZDOTDIR=$PWD HOME=$PWD zsh -df

% git clone [email protected]:marlonrichert/zsh-autocomplete.git
% source zsh-autocomplete/zsh-autocomplete.plugin.zsh

% git clone [email protected]:zdharma/fast-syntax-highlighting.git
% source fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 
  1. Type something like cd but do not hit enter/return - Autocomplete menu now shows as it should
  2. Now clear the line completely with backspace
  3. Wait a second for the sleep process to stop - Important step because typing immediately after clearing the line will not cause the bug
  4. Type cd again and no autocompletions will show - AKA 'the bug'
  5. To unstuck, while in this state, hit your arrow up key to open the history menu and select anything

Expected behavior

When zdharma/fast-syntax-highlighting is loaded and I type a command but then remove it without executing, and wait for some time before entering a new command, the completion menu should just display again.

Actual behavior

When zdharma/fast-syntax-highlighting is loaded and I type a command but then remove it without executing, and wait for some time before entering a new command, the completion menu does not display.

Desktop

  • OS + distribution: macOS Cataline 10.15.6
  • Zsh version: 5.8
  • Plugin version marlonrichert/zsh-autocomplete: 0de4c97eb77da4a5605a616ccb4053bfce559b06
  • Plugin version zdharma/fast-syntax-highlighting: a47b5088636c3678c7baa22710d10b0c45bc9265

Additional context

This same problem does not occur when following the reproduction steps but substitute the highlighter with the non-fast alternative zsh-users/zsh-syntax-highlighting at 62c5575848f1f0a96161243d18497c247c9f52df. See intro.

Bug report

Most helpful comment

Should be fixed now on master with fbb82dfbe1e5d8fe04e8bef2a968b971acdfd5a3

All 5 comments

I had the same problem before. But I solved the problem by loading fast-syntax-highlighting before zsh-autocomplete.
Give it a try.

I had the same problem before. But I solved the problem by loading fast-syntax-highlighting before zsh-autocomplete.
Give it a try.

Thanks, tried that earlier but the issue persists. Forgot to mention in the original report 馃槕

@yutakatay @pcjmfranken Does this problem also occur when you use the dev branch?

@marlonrichert Fixed in dev, nice!

Should be fixed now on master with fbb82dfbe1e5d8fe04e8bef2a968b971acdfd5a3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

windowswithoutborders picture windowswithoutborders  路  6Comments

weilbith picture weilbith  路  4Comments

PSalant726 picture PSalant726  路  8Comments

weilbith picture weilbith  路  8Comments

yutakatay picture yutakatay  路  3Comments