public void VisualSpanAll() { var textBuffer = CreateTextBuffer("cat"); foreach (var visualKind in VisualKind.All) { var visualSpan = VisualSpan.CreateForSpan(textBuffer.GetSpan(0, 1), visualKind, tabStop: 4); var trackingVisualSpan = _bufferTrackingService.CreateVisualSpan(visualSpan); Assert.True(_bufferTrackingService.HasTrackingItems(textBuffer)); trackingVisualSpan.Close(); Assert.False(_bufferTrackingService.HasTrackingItems(textBuffer)); } }
public void VisualSelectionAll() { var textBuffer = CreateTextBuffer("cat"); foreach (var visualKind in VisualKind.All) { var visualSpan = VisualSpan.CreateForSpan(textBuffer.GetSpan(0, 1), visualKind); var visualSelection = VisualSelection.Create(visualSpan, Path.Forward, textBuffer.GetPoint(0)); var trackingVisualSelection = _bufferTrackingService.CreateVisualSelection(visualSelection); Assert.True(_bufferTrackingService.HasTrackingItems(textBuffer)); trackingVisualSelection.Close(); Assert.False(_bufferTrackingService.HasTrackingItems(textBuffer)); } }