Implement copy and paste
This commit is contained in:
parent
f57a1bad3c
commit
a90e51c2a9
1 changed files with 7 additions and 2 deletions
|
@ -144,7 +144,11 @@ export class TerminalInstance implements ITerminalInstance {
|
|||
}
|
||||
|
||||
public copySelection(): void {
|
||||
// TODO: Implement
|
||||
if (document.activeElement.classList.contains('xterm')) {
|
||||
document.execCommand('copy');
|
||||
} else {
|
||||
this.messageService.show(Severity.Warning, nls.localize('terminal.integrated.copySelection.noSelection', 'Cannot copy terminal selection when terminal does not have focus'));
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
|
@ -179,7 +183,8 @@ export class TerminalInstance implements ITerminalInstance {
|
|||
}
|
||||
|
||||
public paste(): void {
|
||||
// TODO: Implement
|
||||
this.focus();
|
||||
document.execCommand('paste');
|
||||
}
|
||||
|
||||
public sendText(text: string, addNewLine: boolean): void {
|
||||
|
|
Loading…
Reference in a new issue