StonehearthEditor.FilePreview.textBox_InsertCheck C# (CSharp) Method

textBox_InsertCheck() private method

private textBox_InsertCheck ( object sender, ScintillaNET.InsertCheckEventArgs e ) : void
sender object
e ScintillaNET.InsertCheckEventArgs
return void
        private void textBox_InsertCheck(object sender, InsertCheckEventArgs e)
        {
            var text = e.Text;

            // Replace tabs with 3 whitespaces
            text = text.Replace("\t", "   ");
            var x = this.textBox.Lines.Select(l => l.Indentation).ToList();

            // TODO: Handle newlines and indention here somehow? Or can Indentation do that?

            // Return the modified text.
            e.Text = text;
        }