-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
languages: Correctly calculate ranges in label_for_completion
#44925
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
languages: Correctly calculate ranges in label_for_completion
#44925
Conversation
3d6e080 to
0812872
Compare
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, but cannot you add an actual test for this?
|
Thank you, while this fixes the issue I found a performance problem. After typing 'res' and getting the auto suggestion box to show up, scrolling through it is slow and zed logged a hangup. Repro is same as in #44825 |
0812872 to
bf34ada
Compare
bf34ada to
41cad4c
Compare
Thanks for the review! I've now added a test which tests whether the ranges are correct for a string where "…" characters were inserted for empty tabstops. Let me know if i should make any further adjustments. |
I cannot reproduce this locally but from my interpretation this looks like not related to this code as it is not found in the trace. Could you try disabling your extensions temporarily and see whether that fixes the issue(as wasm_host.rs is consumes a lot of time in the statistics)? |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, will merge one nit on top, so that the text in the error is shown better.
I build it again in release mode and the problem was gone. Note to self: always test performance in release mode. |
|
/cherry-pick preview |
|
🍒💥 Cherry-pick did not succeed |
|
/cherry-pick stable |
|
🍒💥 Cherry-pick did not succeed |
Closes #44825 Release Notes: - Fixed a case where an incorrect match could be generated in label_for_completion --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Closes #44825
Release Notes: