Skip to content

Missing square bracket in span notation #3145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/extensibility/inside-the-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ A <xref:Microsoft.VisualStudio.Text.SnapshotPoint> represents a character positi

#### Spans and NormalizedSpanCollections

A <xref:Microsoft.VisualStudio.Text.Span> represents an interval that can be applied to a span of text in a text snapshot. Snapshot positions are zero-based, so spans can start at any position including zero. The `End` property of a span is equal to the sum of its `Start` property and its `Length` property. A `Span` does not include the character that is indexed by the `End` property. For example, a span that has Start=5 and Length=3 has End=8, and it includes the characters at positions 5, 6, and 7. The notation for this span is 5..8).
A <xref:Microsoft.VisualStudio.Text.Span> represents an interval that can be applied to a span of text in a text snapshot. Snapshot positions are zero-based, so spans can start at any position including zero. The `End` property of a span is equal to the sum of its `Start` property and its `Length` property. A `Span` does not include the character that is indexed by the `End` property. For example, a span that has Start=5 and Length=3 has End=8, and it includes the characters at positions 5, 6, and 7. The notation for this span is [5..8).

Two spans intersect if they have any positions in common, including the End position. Therefore, the intersection of [3, 5) and [2, 7) is [3, 5) and the intersection of [3, 5) and [5, 7) is [5, 5). (Notice that [5, 5) is an empty span.)

Expand Down Expand Up @@ -315,4 +315,4 @@ Statement completion provides pop-up lists of potential completions for method n
## See also

- [Language service and editor extension points](../extensibility/language-service-and-editor-extension-points.md)
- [Editor imports](../extensibility/editor-imports.md)
- [Editor imports](../extensibility/editor-imports.md)