diff --git a/CHANGELOG.md b/CHANGELOG.md index c36310512b..a194b0740c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ANNIS is a frontend to the graphANNIS webservice, which has its [own changelog]( ## [Unreleased] +### Fixed + +- Displaying error lints in the AQL text field was broken. + ## [4.15.2] - 2026-04-20 ### Changed diff --git a/pom.xml b/pom.xml index a266b48517..3dd30ecbad 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,8 @@ UTF-8 11 + 11 + 11 8.14.3 true org.corpus_tools.annis.gui.AnnisUiApplication @@ -592,7 +594,7 @@ org.apache.tika tika-core - [3.2.2,) + 3.3.1 diff --git a/src/main/resources/org/corpus_tools/annis/gui/components/codemirror/AqlCodeEditor.js b/src/main/resources/org/corpus_tools/annis/gui/components/codemirror/AqlCodeEditor.js index 21af304d34..5b57a95c92 100644 --- a/src/main/resources/org/corpus_tools/annis/gui/components/codemirror/AqlCodeEditor.js +++ b/src/main/resources/org/corpus_tools/annis/gui/components/codemirror/AqlCodeEditor.js @@ -126,10 +126,23 @@ window.org_corpus_tools_annis_gui_components_codemirror_AqlCodeEditor = function for(var i=0; i < connector.getState().errors.length; i++) { var err = connector.getState().errors[i]; - var endColumn = err.endColumn+1; + // The line starts at 0, but the columns start at 1 + var startLine = err.startLine; + var startColumn = err.startColumn - 1; + + var endLine; + var endColumn; + if(err.endLine == 0 && err.endColumn == 0 ) { + // Use the start column if there is not end given + endLine = startLine; + endColumn = startColumn + 2; + } else { + endColumn = err.endColumn; + endLine = err.endLine; + } errorList.push({ - from: CodeMirror.Pos(err.startLine-1, err.startColumn-1), - to: CodeMirror.Pos(err.endLine-1, endColumn-1), + from: CodeMirror.Pos(startLine, startColumn), + to: CodeMirror.Pos(endLine, endColumn), message: err.message }); }