-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Suggestions often inserted in incorrect place #4851
Comments
Here is the same thing in the helix codebase: Untitled.movIt was significantly harder to reproduce than on the React / TypeScript codebase. |
Can you check if this PR fixes it for you? #1819 |
@archseer Hey, how would I properly test this? I tried merging it into current master which lead to merge conflicts. That pull request is currently 428 commits behind. The bug could have been introduced in one of those. Do you have any prior commit you would want me to try to confirm that the issue existed before the fix? |
I'm pretty sure the issue is with the LSP response being slow and extra characters being typed before it comes back and has always been there. That PR is specifically supposed to address that. |
@archseer #1819 needs to be rebased to master for people to test, @Elias-Graf was saying there are merge conflicts. There seems to be problems with the pull request reported too... I have been hit by this serious bug using Rust #4380, it would be great to get it sorted for |
@archseer I'm going to test tomorrow with the fixed but old version. For the like 15 mins I have been using it today, it seemed like that issue was gone (although I couldn't always autocomplete, since the sorting of the items seemed worse). If this fixes the issue, I would really appreciate if it could be merged quickly, as it's actively preventing me from programming, and I've switched back to VS Code for languages where the language server is apparently slower than my typing. |
@archseer I have been using it a few hours now, and haven't experienced the issue since. I can't be 100% sure, because some things are obviously outdated in this rather old commit (see: #4851 (comment)). @cossonleo maybe you could look into bringing the bugfix back in line with master? |
Should be fixed by #6173 |
Summary
Suggestions are often inserted into the incorrect place. This does occur more frequently when the computer itself is not the quickest (e.g. happens more often on my laptop than on my desktop), and is way more frequent on larger code bases.
See this video that shows the issue in action:
Screen.Recording.2022-11-22.at.12.11.46.mov
Notice how I'm trying to complete after I typed "expe", but the completions seem to be "old". So it then seems to use old position information and just inserts it before the "p", leaving me with "expectp". Same thing happens with "e" ("expecte") in a different try after that.
Btw. the project in question is in React / TypeScript.
Sometimes this leaves me with up to three redundant characters on a completion "attempt" (which I use extensively), so it's not rare that I need to correct four different things on a single line.
Reproduction Steps
Sadly, there is no clear-cut reproduction I can provide. But it feels like a race condition to me?
Helix log
As far as I'm able to tell, there is no log produced during the entirety of the issue.
Platform
macOs
Terminal Emulator
iTerm 2
Helix Version
helix-term 22.08.1 (5ad3bef)
The text was updated successfully, but these errors were encountered: