Alsing.Windows.Forms.SyntaxBox.Caret.MoveHome C# (CSharp) Method

MoveHome() public method

Moves the caret to the first non whitespace column at the active row
public MoveHome ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void
        public void MoveHome(bool Select)
        {
            CropPosition();
            if (CurrentRow.IsCollapsedEndPart)
            {
                Position.Y = CurrentRow.Expansion_StartRow.Index;
                MoveHome(Select);
            }
            else
            {
                int i = CurrentRow.GetLeadingWhitespace().Length;
                Position.X = Position.X == i ? 0 : i;
                RememberXPos();
                CaretMoved(Select);
            }
        }