Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/vs/platform/clipboard/browser/clipboardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class BrowserClipboardService extends Disposable implements IClipboardSer
this.clearResourcesState();

// With type: only in-memory is supported
Comment thread
justin39 marked this conversation as resolved.
Outdated
if (type) {
if (type && type !== 'clipboard') {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactoring this now feels overkill, would rather keep this change tightly scoped - I don't feel strongly about this though

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