Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public int GetStartPoint(IEditorBufferSnapshot snapshot) => _span.GetStartPoint(snapshot.As <ITextSnapshot>());