Skip to content

Commit f690534

Browse files
Styling
1 parent 468e831 commit f690534

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Public/js/views/expression_highlighter.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ export default class ExpressionHighlighter extends EventDispatcher {
8888
const endCoords = editor.charCoords(location.endPos, "local");
8989
widget.style.left = `${startCoords.left + 1}px`;
9090
widget.style.top = `${startCoords.bottom - 1}px`;
91-
widget.style.width = `${endCoords.left - startCoords.left - 2}px`;
91+
if (error.location.start === error.location.end) {
92+
widget.style.width = `${editor.defaultCharWidth()}px`;
93+
} else {
94+
widget.style.width = `${endCoords.left - startCoords.left - 2}px`;
95+
}
9296

9397
this.widgets.push(widget);
9498
}

0 commit comments

Comments
 (0)