IVsFindTarget.GetCurrentSpan(TextSpan[]) Method

Definition

Returns the coordinates or the caret position of the current selection.

public:
 int GetCurrentSpan(cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
public:
 int GetCurrentSpan(Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts);
int GetCurrentSpan(std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pts);
public int GetCurrentSpan (Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pts);
abstract member GetCurrentSpan : Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetCurrentSpan (pts As TextSpan()) As Integer

Parameters

pts
TextSpan[]

[out] Specifies the current caret position or highlighted selection.

Returns

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

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsFindTarget::GetCurrentSpan(  
   [out, retval] TextSpan * pts  
);  

Return the current caret position or the start and end positions of the highlighted selection. Place the position information in a TextSpan structure. For caret position, the start and end positions should be the same.

Applies to