You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting a test results in the next test marker moving to the wrong line #5831
changed the title [-]Deleting a test results in the next test market moving to the wrong line[/-][+]Deleting a test results in the next test marker moving to the wrong line[/+]on Dec 4, 2025
The top two get swapped around, and their positions removed.
The bug was that when a tracked range (which is a start and end position) was deleted, we first deleted the start position (internally, range tracker is just two position trackers), which caused the first range tracker to dispose itself. This reduced the number of position trackers, but it was done in a callback during the processing, so the code looping over the position trackers skipped one (because the collection was modified).
This resulted in only the end position of the second range being changed (resulting in a range where the start was before the end!) which caused weird things to happen.
Activity
FMorschel commentedon Dec 4, 2025
Typo (title): marker*
[-]Deleting a test results in the next test market moving to the wrong line[/-][+]Deleting a test results in the next test marker moving to the wrong line[/+]FMorschel commentedon Dec 4, 2025
Run the following test file and run
Dart: Sort Members. See a similar behaviour. Is this the exact same?Note that it doesn't happen if all tests are the same line length.
Fix test tracking when ranges are deleted
Fix test tracking when ranges are deleted
DanTup commentedon Dec 4, 2025
With my fix, I end up with this:
The top two get swapped around, and their positions removed.
The bug was that when a tracked range (which is a start and end position) was deleted, we first deleted the start position (internally, range tracker is just two position trackers), which caused the first range tracker to dispose itself. This reduced the number of position trackers, but it was done in a callback during the processing, so the code looping over the position trackers skipped one (because the collection was modified).
This resulted in only the end position of the second range being changed (resulting in a range where the start was before the end!) which caused weird things to happen.
Fix test tracking when ranges are deleted