Skip to content

Commit

Permalink
Handle empty edits for TS paste
Browse files Browse the repository at this point in the history
Should use default paste in this case. Talking with TS if this should be handled differently from the server but worth adding the workaround for now
  • Loading branch information
mjbvz committed Jul 18, 2024
1 parent d1e7a94 commit 38a657f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
pasteLocations: ranges.map(typeConverters.Range.toTextSpan),
copiedFrom
}, token));
if (response.type !== 'response' || !response.body || token.isCancellationRequested) {
if (response.type !== 'response' || !response.body?.edits.length || token.isCancellationRequested) {
return;
}

Expand Down

0 comments on commit 38a657f

Please sign in to comment.