-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix recent edits context source (#6071)
## Context 1. Recent edits context source outputs wrong diffs sometimes. The behaviour is not reproducible always, but can be seen from the output logs. Adding one such example in below: <img width="1442" alt="image" src="https://github.com/user-attachments/assets/d36c8601-3a8e-42f4-a5e8-c3276a6e9e35"> 2. On further inspection, it turns out that sometimes when events are received `private onDidChangeTextDocument` the text document could have changed, and reading `document.getText()` returns change with the updated text (i.e. including the change we received). Although this behaviour is not always reproducible. So, this PR reads the text document during the constructor call or when the document is first opened. ## Test plan Manual inspection
- Loading branch information
1 parent
07df3f9
commit 1167681
Showing
3 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters