Skip to content

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner February 4, 2022 23:29
@ghost ghost added the Area-IDE label Feb 4, 2022

var position = caret.Value.Position;
var currentSnapshot = subjectBuffer.CurrentSnapshot;
if (position >= currentSnapshot.Length)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this happen because of virtual space? Otherwise how can the position extend beyond the document?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caret at the end of the file will be at snapshot.Length. it is after the last actual character.

@CyrusNajmabadi CyrusNajmabadi merged commit c49cfb3 into dotnet:main Feb 7, 2022
@ghost ghost added this to the Next milestone Feb 7, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the outOfBoundsCheck branch February 7, 2022 06:02
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants