Commit 51fa22f
Sort diagnostics by line number to prevent stale signs
Some signs would not be removed from the sign column when their
diagnostic was fixed.
Debugging revealed that signs_to_add would include two signs for the
same line. `state.signs`is keyed by line number so the second sign for
a line will overwrite the first when signs_to_add is recorded in state.
The first sign's id is lost when it's overwritten so it can't be
removed.
signs_to_add included two signs for the same line because itertools
`group_by` only groups consecutive runs (it's more efficient, you only
need to remember the current group and can flush it when the key
changes).
This quick fix sorts diagnostics by line number so that group_by gives
us one group per line number.
fixes #9521 parent df4a931 commit 51fa22f
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2536 | 2536 | | |
2537 | 2537 | | |
2538 | 2538 | | |
| 2539 | + | |
2539 | 2540 | | |
2540 | 2541 | | |
2541 | 2542 | | |
| |||
0 commit comments