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); }
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)); }
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()); }