We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffcf7e5 commit f0133c3Copy full SHA for f0133c3
src/cm/lsp/diagnostics.js
@@ -67,8 +67,14 @@ function mapDiagnostics(plugin, state) {
67
const mapped = [];
68
69
for (const diagnostic of stored) {
70
- const from = changes.mapPos(diagnostic.from, 1, MapMode.TrackDel);
71
- const to = changes.mapPos(diagnostic.to, -1, MapMode.TrackDel);
+ let from;
+ let to;
72
+ try {
73
+ from = changes.mapPos(diagnostic.from, 1, MapMode.TrackDel);
74
+ to = changes.mapPos(diagnostic.to, -1, MapMode.TrackDel);
75
+ } catch (_) {
76
+ continue;
77
+ }
78
if (from != null && to != null) {
79
mapped.push({ ...diagnostic, from, to });
80
}
0 commit comments