Skip to content
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

Fixing exception on unsaved file #60362

Merged
merged 2 commits into from
Nov 3, 2024
Merged

Conversation

navya9singh
Copy link
Member

Fixes #60087. It returns no edits when paste is applied to an unsaved file.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 28, 2024
@@ -2981,6 +2981,7 @@ export class Session<TMessage = string> implements EventSender {
}
private getPasteEdits(args: protocol.GetPasteEditsRequestArgs): protocol.PasteEditsAction | undefined {
const { file, project } = this.getFileAndProject(args);
if (!this.host.fileExists(file)) return undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Use isDynamicFileName instead

@navya9singh navya9singh merged commit 0ec4d30 into microsoft:main Nov 3, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Exception on getPasteEdits between on disk file and unsaved file
3 participants