This commit is contained in:
Megan Rogge 2022-05-02 14:10:45 -07:00 committed by GitHub
parent 57479a5f6b
commit 52ff0231ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1154,7 +1154,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
const textAsHtml = await xterm.getSelectionAsHtml(command);
function listener(e: any) {
if (!e.clipboardData.types.includes('text/plain')) {
e.clipboardData.setData('text/plain', command?.getOutput());
e.clipboardData.setData('text/plain', command?.getOutput() ?? '');
}
e.clipboardData.setData('text/html', textAsHtml);
e.preventDefault();