Пример #1
0
            public void PartialTab()
            {
                Create("d\tog", "extra");
                var point = SnapshotLineUtil.GetSpaceWithOverlapOrEnd(_textBuffer.GetLine(0), spacesCount: 4, tabStop: 4);

                Assert.Equal(_textBuffer.GetPoint(position: 2), point.Point);
            }
Пример #2
0
        private SnapshotOverlapSpan GetSpanFromSpaceAndCount(ITextSnapshotLine line, int start, int count, int tabStop)
        {
            var startPoint = SnapshotLineUtil.GetSpaceWithOverlapOrEnd(line, start, tabStop);
            var endPoint   = SnapshotLineUtil.GetSpaceWithOverlapOrEnd(line, start + count, tabStop);

            return(new SnapshotOverlapSpan(startPoint, endPoint));
        }
Пример #3
0
            public void AfterTab()
            {
                Create("d\tog", "extra");
                var point = SnapshotLineUtil.GetSpaceWithOverlapOrEnd(_textBuffer.GetLine(0), spacesCount: 5, tabStop: 4);

                Assert.Equal(_textBuffer.GetPoint(position: 3), point.Point);
                Assert.Equal('g', point.Point.GetChar());
            }