Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/vs
diff options
context:
space:
mode:
authorMatt Bierner <matb@microsoft.com>2022-06-09 03:30:54 +0300
committerGitHub <noreply@github.com>2022-06-09 03:30:54 +0300
commitdc3b8f245665ba0b7fdfade0292a17eff545b20a (patch)
treee32194dc14d7cb2f18f2719c0bbef5213d2a5733 /src/vs
parent23c073031e5fb172a69b566dd33cac9d740981f1 (diff)
Allow paste API to replace metadata on copy (#151572)
This lets the paste api replace data, such as `text/plain` on copy
Diffstat (limited to 'src/vs')
-rw-r--r--src/vs/editor/contrib/copyPaste/browser/copyPasteController.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vs/editor/contrib/copyPaste/browser/copyPasteController.ts b/src/vs/editor/contrib/copyPaste/browser/copyPasteController.ts
index 4bcc1e5c2a7..2ad4c28a6eb 100644
--- a/src/vs/editor/contrib/copyPaste/browser/copyPasteController.ts
+++ b/src/vs/editor/contrib/copyPaste/browser/copyPasteController.ts
@@ -148,7 +148,7 @@ export class CopyPasteController extends Disposable implements IEditorContributi
if (handle && this._currentClipboardItem?.handle === handle) {
const toMergeDataTransfer = await this._currentClipboardItem.dataTransferPromise;
toMergeDataTransfer.forEach((value, key) => {
- dataTransfer.append(key, value);
+ dataTransfer.replace(key, value);
});
}