diff --git a/EditorContext/JSONEditorContext.cs b/EditorContext/JSONEditorContext.cs index c3a90ea..85fc42a 100644 --- a/EditorContext/JSONEditorContext.cs +++ b/EditorContext/JSONEditorContext.cs @@ -196,7 +196,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri if (colError != null) { - ColumnErrors.TryAdd(new Point(idxCol, row), colError.ErrorMessage); + ColumnErrors.TryAdd(new Point(idxCol, idxRow), colError.ErrorMessage); } var jsonParseMatch = tokens[new Point(tokenCol, idxRow + 1)]; diff --git a/EditorContext/PowerShellEditorContext.cs b/EditorContext/PowerShellEditorContext.cs index c590fe2..5b77f36 100644 --- a/EditorContext/PowerShellEditorContext.cs +++ b/EditorContext/PowerShellEditorContext.cs @@ -275,7 +275,7 @@ public override void ParseText(int height, int topRow, int left, int right, stri if (colError != null) { - ColumnErrors.TryAdd(new Point(idxCol, row), colError.ErrorMessage); + ColumnErrors.TryAdd(new Point(idxCol, idxRow), colError.ErrorMessage); } if (rune == '\t') diff --git a/EditorTextView.cs b/EditorTextView.cs index f760e4d..23fa94b 100644 --- a/EditorTextView.cs +++ b/EditorTextView.cs @@ -146,15 +146,16 @@ public override void Redraw(Rect bounds) if (editorContext != null) { var point = new Point(idxCol, row); + var errorPoint = new Point(idxCol, idxRow); var color = editorContext.GetColorByPoint(point); if (Selecting && PointInSelection(idxCol, idxRow)) { Driver.SetAttribute(Terminal.Gui.Attribute.Make(color, Color.Blue)); } - else if (ColumnErrors.ContainsKey(point)) + else if (ColumnErrors.ContainsKey(errorPoint)) { - Driver.SetAttribute(Terminal.Gui.Attribute.Make(color, Color.Red)); + Driver.SetAttribute(Terminal.Gui.Attribute.Make(color, Color.Red)); } else {