make squigglies render themselves correctly over multiple lines

turns out there was a stupid typo, and the diagnostic's firstLine was == its lastLine
This commit is contained in:
りき萌 2025-05-26 21:50:48 +02:00
parent 6b82593414
commit 2b924c3efb

View file

@ -102,7 +102,7 @@ export class BrushEditor extends HTMLElement {
for (let diagnostic of diagnostics) {
let firstLine = lineMap.lineIndexAt(diagnostic.start);
let lastLine = lineMap.lineIndexAt(diagnostic.start);
let lastLine = lineMap.lineIndexAt(diagnostic.end);
for (let i = firstLine; i <= lastLine; ++i) {
let bounds = lineMap.get(i);
let start = i == firstLine ? diagnostic.start - bounds.start : 0;