Fixing exception on unsaved file by navya9singh · Pull Request #60362 · microsoft/TypeScript

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

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
}
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 reacted with thumbs up emoji

@navya9singh navya9singh merged commit 0ec4d30 into microsoft:main

Nov 3, 2024

@sandersn sandersn removed this from PR Backlog

Apr 22, 2025

@microsoft microsoft locked as resolved and limited conversation to collaborators

Oct 15, 2025

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@andrewbranch andrewbranch andrewbranch approved these changes

Labels

Author: Team For Milestone Bug

PRs that fix a bug with a specific milestone

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Exception on getPasteEdits between on disk file and unsaved file

3 participants

@navya9singh @andrewbranch @typescript-bot