From 2b924c3efbdfb4adba4e2869b66003fbbb843dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=AA=E3=82=AD=E8=90=8C?= Date: Mon, 26 May 2025 21:50:48 +0200 Subject: [PATCH] make squigglies render themselves correctly over multiple lines turns out there was a stupid typo, and the diagnostic's firstLine was == its lastLine --- static/brush-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/brush-editor.js b/static/brush-editor.js index 38d43df..e88e3af 100644 --- a/static/brush-editor.js +++ b/static/brush-editor.js @@ -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;