Ejemplo n.º 1
0
        public void RemoveSelectionRegions()
        {
            var buffer    = this.theView.TextBuffer;
            var outlining = SelectionOutliningManager.Get(this.theView.TextBuffer);

            this.theView.LayoutChanged += OnTextViewLayoutChanged;
            outlining.RemoveAll(buffer.CurrentSnapshot);
        }
Ejemplo n.º 2
0
        public void CollapseSelectionRegions()
        {
            var buffer    = this.theView.TextBuffer;
            var outlining = SelectionOutliningManager.Get(this.theView.TextBuffer);
            var allDoc    = buffer.CurrentSnapshot.GetSpan();

            var regions = outlining.GetTags(new NormalizedSnapshotSpanCollection(allDoc));

            this.theView.LayoutChanged += OnTextViewLayoutChanged;
            foreach (var regionSpan in regions)
            {
                TryCollapseRegion(regionSpan);
            }
        }