ITextViewModel::IsPointInVisualBuffer Method (SnapshotPoint, PositionAffinity)

 

Determines whether a point in the edit buffer is represented in the visual buffer.

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

bool IsPointInVisualBuffer(
	SnapshotPoint editBufferPoint,
	PositionAffinity affinity
)

Parameters

editBufferPoint
Type: Microsoft.VisualStudio.Text::SnapshotPoint

A point in the EditBuffer.

affinity
Type: Microsoft.VisualStudio.Text::PositionAffinity

If the mapping is ambiguous, this parameter affects the mapping as follows:

if affinity is Predecessor, the mapping targets the position immediately after the preceding character in the projection buffer

if affinity is Successor, the mapping targets the position immediately before the following character in the projection buffer.

This parameter has no effect if the mapping is unambiguous.

Return Value

Type: System::Boolean

true if the point is represented in the visual buffer, otherwise false.

A point that is represented in the visual buffer may not be visible on screen, but if the view is scrolled to that position, then the point would become visible.

Return to top
Show: