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

Async (native) backend with cache disabled flickers when user types too fast #1468

Open
dgutov opened this issue Apr 23, 2024 · 0 comments
Open
Milestone

Comments

@dgutov
Copy link
Member

dgutov commented Apr 23, 2024

This is basically a remaining issue from the previous work on asynchronous company backends (and improving the popup display when they are used).

Linking to the old comment: #654 (comment)

To reproduce:

  • Add no-cache t to the definition of company-clang.
  • Replace the clang executable with a script like (to make sure responses are slow)
#!/bin/env bash

sleep 1

exec -a $0 /usr/bin/clang "$@"

The current practice in this field is returning the previous list of completions when the computation of the new one is interrupted. Perhaps this can be good enough for the built-in fix as well.

Additionally, I've got a request for opt-in wrapping of capf sources with while-no-input. It seems like, without additional improvements, such sources should exhibit the same problem, so the fix could be the same.

@dgutov dgutov added this to the 1.0 milestone Apr 23, 2024
dgutov added a commit that referenced this issue May 14, 2024
Employ the scheme previously devised by lsp-mode folks: keep the old list of
completions (setting it to nil is what created the flicker) but updated the
prefix.

This is for "continue" case, of course. begin-new should still fail.

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

No branches or pull requests

1 participant