Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/vs/platform/clipboard/browser/clipboardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ export class BrowserClipboardService extends Disposable implements IClipboardSer
// Clear resources given we are writing text
this.clearResourcesState();

// With type: only in-memory is supported
if (type) {
// With type (except 'clipboard'): only in-memory is supported
if (type && type !== 'clipboard') {
this.mapTextToType.set(type, text);
this.logService.trace('BrowserClipboardService#writeText');
return;
Expand Down Expand Up @@ -178,7 +178,7 @@ export class BrowserClipboardService extends Disposable implements IClipboardSer
async readText(type?: string): Promise<string> {
this.logService.trace('BrowserClipboardService#readText called with type:', type);
// With type: only in-memory is supported
if (type) {
if (type && type !== 'clipboard') {
const readText = this.mapTextToType.get(type) || '';
this.logService.trace('BrowserClipboardService#readText text.length:', readText.length);
return readText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class BrowserClipboardService extends BaseBrowserClipboardService {
type = 'vscode-tests'; // force in-memory clipboard for tests to avoid permission issues
}

if (type) {
if (type && type !== 'clipboard') {
this.logService.trace('BrowserClipboardService#super.readText');
return super.readText(type);
}
Expand Down