IVsExpansionClient.PositionCaretForEditing(IVsTextLines, TextSpan[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called to position the edit caret in the specified place in a code snippet after it has been inserted and formatted.
public:
int PositionCaretForEditing(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ts);
public:
int PositionCaretForEditing(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ts);
int PositionCaretForEditing(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & pBuffer, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ts);
public int PositionCaretForEditing (Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ts);
abstract member PositionCaretForEditing : Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function PositionCaretForEditing (pBuffer As IVsTextLines, ts As TextSpan()) As Integer
Parameters
- pBuffer
- IVsTextLines
[in] An IVsTextLines object that represents the text buffer where the code snippet has been inserted.
- ts
- TextSpan[]
[in] A TextSpan object that describes the location where the code snippet was inserted.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr2.idl:
HRESULT IVsExpansionClient::PositionCaretForEditing(
[in]IVsTextLines *pBuffer,
[in]TextSpan *ts
);
This method is called after the edit caret has been positioned according to the notations in the code snippet file. This method provides an opportunity to override the normal placement of the edit caret but is rarely used.