IEditorOperations.MoveToStartOfLine Method (Boolean)

 

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.

Return to top
Show: