AppKit.TextKit.Formatter.SourceTextView.IndentText C# (CSharp) Method

IndentText() public method

Indents the currently selected text.
public IndentText ( ) : void
return void
		public void IndentText() {

			// Grab range
			var range = Formatter.FindLineBoundries(TextStorage.Value, SelectedRange);
			var line = TextStorage.Value.Substring((int)range.Location, (int)range.Length);

			// Increase tab indent
			var output = IncreaseTabIndent(line);

			// Reformat section
			TextStorage.BeginEditing();
			Replace(range, output);
			TextStorage.EndEditing ();
			SelectedRange = new NSRange(range.Location, output.Length);
			Formatter.HighlightSyntaxRegion(TextStorage.Value, SelectedRange);
		}