public ISnapshotPoint MapToView(IEditorBufferSnapshot snapshot, int position) { var target = _textView.BufferGraph .MapUpToBuffer( new SnapshotPoint(snapshot.As <ITextSnapshot>(), position), PointTrackingMode.Positive, PositionAffinity.Successor, _textView.TextBuffer); return(target.HasValue ? new EditorSnapshotPoint(_textView.TextBuffer.CurrentSnapshot, target.Value) : null); }
public int GetStartPoint(IEditorBufferSnapshot snapshot) => _span.GetStartPoint(snapshot.As <ITextSnapshot>());