From d8b933339c960879624ff4d6385f8a7248f23f79 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Sat, 30 May 2015 18:43:57 -0400 Subject: [PATCH] Updated code preview autoscroll to turn tabs into spaces --- Controls/CodePreview.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)