IVsExpansionSession::EndCurrentExpansion Method (Int32)

 

Called to indicate the end of the current code snippet insertion process.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

int EndCurrentExpansion(
	int fLeaveCaret
)

Parameters

fLeaveCaret
Type: System::Int32

[in] Non-zero (TRUE) if to leave the edit caret where it is; otherwise, zero (FALSE) if the edit caret should be positioned according to the code snippet template.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From textmgr2.idl:

HRESULT IVsExpansionSession::EndCurrentExpansion(
   [in]bool fLeaveCaret
);

A code snippet template typically marks where the edit caret should be positioned after the snippet has been inserted and the special edit mode is completed. This method is called during the special edit mode when the user types the Enter or ESC keys. If Enter is typed, the fLeaveCaret parameter should be set to non-zero (TRUE) and if ESC is typed, the fLeaveCaret parameter should be set to zero (FALSE). This method positions the caret appropriately in the associated text view before returning.

Return to top
Show: