-
Notifications
You must be signed in to change notification settings - Fork 55
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
fix: range create error #584
base: development
Are you sure you want to change the base?
Conversation
fea62ff
to
ccef666
Compare
@kanej should I rebase and merge this ? |
Can you rebase this. I added this as a draft as I stumbled over the recreation steps for it while testing something else. I quickly put together a fix while it was fresh in my mind - but without the time to work through in detail. So the current state is, we can reproduce the Basically, I think the next steps are:
|
If the import completion is triggered by deleting a quote on an existing import and readding it then, the position is the start of the import but we delete the entire length of the import line which creates a negative position triggering the bug. Instead, we short circuit. If the import is already the suggestion we don't suggest it again. Fixes #150.
232974a
to
058680e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #584 +/- ##
===============================================
- Coverage 54.52% 54.49% -0.04%
===============================================
Files 226 226
Lines 5199 5202 +3
Branches 800 801 +1
===============================================
Hits 2835 2835
- Misses 2127 2129 +2
- Partials 237 238 +1 ☔ View full report in Codecov by Sentry. |
@kanej just rebased and reproduced the original issue. Your PR effectively solves the problem, so it's good to go on our merge backlog |
If the import completion is triggered by deleting a quote on an existing import and readding it then, the position is the start of the import but we delete the entire length of the import line which creates a negative position triggering the bug.
Instead, we short circuit. If the import is already the suggestion we don't suggest it again.
Fixes #150.