Skip to content

Commit

Permalink
Rebase against the upstream 7d788e7
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: 7d788e7
  • Loading branch information
Eclipse Che Sync committed Apr 1, 2024
2 parents fee81db + 7d788e7 commit c5bae35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Expand Up @@ -156,9 +156,14 @@ class ResourcePasteOrDropProvider implements vscode.DocumentPasteEditProvider, v
return;
}

// Disable ourselves if there's also a text entry with the same content as our list,
// In some browsers, copying from the address bar sets both text/uri-list and text/plain.
// Disable ourselves if there's also a text entry with the same http(s) uri as our list,
// unless we are explicitly requested.
if (uriList.entries.length === 1 && !context?.only?.contains(ResourcePasteOrDropProvider.kind)) {
if (
uriList.entries.length === 1
&& (uriList.entries[0].uri.scheme === Schemes.http || uriList.entries[0].uri.scheme === Schemes.https)
&& !context?.only?.contains(ResourcePasteOrDropProvider.kind)
) {
const text = await dataTransfer.get(Mime.textPlain)?.asString();
if (token.isCancellationRequested) {
return;
Expand Down
Expand Up @@ -74,7 +74,6 @@ export function createInsertUriListEdit(
return;
}


const edits: vscode.SnippetTextEdit[] = [];

let insertedLinkCount = 0;
Expand Down

0 comments on commit c5bae35

Please sign in to comment.