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));
                }
            }
Пример #2
0
            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));
                }
            }