Expand Minimize

IEditorOperations.MoveToStartOfLine Method

Moves the caret to the start of the line.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

void MoveToStartOfLine(
	bool extendSelection
)

Parameters

extendSelection
Type: System.Boolean

If true, the selection is extended when the caret is moved; if false, the selection is not extended.

If the caret is in the middle of the line, move it to the start of the first non-whitespace character. If the caret is at the start of the first whitespace character, move it to the start of the line. If the caret is at the start of a line containing non-whitespace characters, move it to the start of the first non-whitespace character. If the caret is at the start of a line with only whitespace characters, move it to the start of the line.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft