private void method_0(object sender, TextSnapshotChangingEventArgs e) { if (e.TextChange.Operations.Count == 1 && e.TextChange.Type == TextChangeTypes.Enter && !e.TextChange.Operations[0].IsProgrammaticTextReplacement) { SyntaxEditor syntaxEditor = this.nitriqSyntaxEditor_0; e.Cancel = true; int num = syntaxEditor.ActiveView.CurrentViewLine.FirstNonWhitespaceCharacterIndex; if (num > syntaxEditor.Caret.Position.Character) { num = syntaxEditor.Caret.Position.Character; } string text = "\n" + syntaxEditor.ActiveView.CurrentViewLine.Text.Substring(0, num); syntaxEditor.ActiveView.ReplaceSelectedText(TextChangeTypes.AutoIndent, text); } }