diff options
author | Matt Bierner <matb@microsoft.com> | 2022-06-09 03:30:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 03:30:54 +0300 |
commit | dc3b8f245665ba0b7fdfade0292a17eff545b20a (patch) | |
tree | e32194dc14d7cb2f18f2719c0bbef5213d2a5733 /src/vs | |
parent | 23c073031e5fb172a69b566dd33cac9d740981f1 (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.ts | 2 |
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); }); } |