From eab78250e6e50834732381101010b212f6fcba24 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Fri, 10 Oct 2025 14:12:43 +0200 Subject: [PATCH 1/2] Do not calculate relative offset for highlighting ranges received from parse errors --- src/components/AutoSuggestion/AutoSuggestion.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/AutoSuggestion/AutoSuggestion.tsx b/src/components/AutoSuggestion/AutoSuggestion.tsx index d7717a6ea..0cf9869e5 100644 --- a/src/components/AutoSuggestion/AutoSuggestion.tsx +++ b/src/components/AutoSuggestion/AutoSuggestion.tsx @@ -317,12 +317,11 @@ const AutoSuggestion = ({ }; if (parseError) { const { message, start, end } = parseError; - const { toOffset, fromOffset } = getOffsetRange(cm, start, end); clearCurrentErrorMarker(); const { from, to } = markText({ view: cm, - from: fromOffset, - to: toOffset, + from: start, + to: end, className: `${eccgui}-autosuggestion__text--highlighted-error`, title: message, }); From 1824ca180623e50a0fac9791529a9d5b4a4c86d2 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Tue, 14 Oct 2025 11:04:54 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 756d9383c..8d86073d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,8 @@ This is a major release, and it might be not compatible with your current usage - ``: - Add 'nopan', 'nowheel' and 'nodrag' classes to Modal's overlay classes in order to always prevent react-flow to react to drag and pan actions in modals. +- ``: + - In multiline mode, validation errors might be highlighted incorrectly (relative line offset added). ### Changed