diff --git a/Controls/CodePreview.cs b/Controls/CodePreview.cs index 998a1a0..f769641 100644 --- a/Controls/CodePreview.cs +++ b/Controls/CodePreview.cs @@ -138,8 +138,8 @@ public void CenterEditor(int line) column = Math.Min(column, lineIndentation); } - - this.Editor.LineScroll(column - 2, 0); + var indentation = column / Editor.TabWidth; + this.Editor.LineScroll(column - indentation, 0); } static bool IsNullOrWhiteSpace(string value)