private int CurrentLineIndent(TextBuilder tb) { for (int i = tb.Length - 1; i >= 0; i--) { if (CharExtensions.IsLineBreak(tb.Text[i])) { return IndentBuilder.TextIndentInSpaces(tb.Text.Substring(i + 1), _options.TabSize); } } return 0; }