Skip to content

Commit eab7825

Browse files
Do not calculate relative offset for highlighting ranges received from parse errors
1 parent 0f727a9 commit eab7825

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/AutoSuggestion/AutoSuggestion.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,11 @@ const AutoSuggestion = ({
317317
};
318318
if (parseError) {
319319
const { message, start, end } = parseError;
320-
const { toOffset, fromOffset } = getOffsetRange(cm, start, end);
321320
clearCurrentErrorMarker();
322321
const { from, to } = markText({
323322
view: cm,
324-
from: fromOffset,
325-
to: toOffset,
323+
from: start,
324+
to: end,
326325
className: `${eccgui}-autosuggestion__text--highlighted-error`,
327326
title: message,
328327
});

0 commit comments

Comments
 (0)