From 4d54935615374f3906edc8376763311693043e29 Mon Sep 17 00:00:00 2001 From: Lukasz Baldyga Date: Sun, 25 Oct 2020 10:45:34 +0000 Subject: [PATCH] Fixed inconsistency between error lines and rows --- .../Advanced Software Engineering/Windows/TextEditor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Advanced Software Engineering/Advanced Software Engineering/Windows/TextEditor.cs b/Advanced Software Engineering/Advanced Software Engineering/Windows/TextEditor.cs index e56e8d8..f3bb28c 100644 --- a/Advanced Software Engineering/Advanced Software Engineering/Windows/TextEditor.cs +++ b/Advanced Software Engineering/Advanced Software Engineering/Windows/TextEditor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -103,6 +103,8 @@ namespace Advanced_Software_Engineering { private void updateRowCol() { int line = textBox1.GetLineFromCharIndex(textBox1.SelectionStart); int column = textBox1.SelectionStart - textBox1.GetFirstCharIndexFromLine(line); + line++; + column++; label1.Text = "row: " + line.ToString() + " col: " + column.ToString(); }