Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lsp): renderDiagnostic and explainError hash collisions
The list of positions we've visited so far was hashed as line number + column number which meant that if a diagnostic was at line 9, column 16 it would conflict with one at line 21, column 4, for example. This would result in diagnostics later in the file being skipped even if they were closer to where the cursor was. We now hash the list with 1000 * line number + column number so that a conflict is only possible if a diagnostic is at column 1000 or more. Conflicts are still technically possible, but this was faster to implement than a full solution which would store the exact cursor position for each diagnostic visited so far.
- Loading branch information