private void ErrorBox_OnGoToErrorPositionEvent(object sender, EventArgs e) { BoxSqlCurrentSubQuery.Focus(); if (_errorPosition1 == -1) { return; } if (BoxSqlCurrentSubQuery.LineCount != 1) { BoxSqlCurrentSubQuery.ScrollToLine(BoxSqlCurrentSubQuery.GetLineIndexFromCharacterIndex(_errorPosition1)); } BoxSqlCurrentSubQuery.CaretIndex = _errorPosition1; }