提交 f4b0736e 编写于 作者: C Christof Marti

Fixes #7346: Paste native EOL

上级 e6a5c9d9
......@@ -49,7 +49,7 @@ export class TerminalInstance {
this.xterm.on('data', (data) => {
this.terminalProcess.process.send({
event: 'input',
data: data && data.replace(TerminalInstance.eolRegex, os.EOL)
data: this.sanitizeInput(data)
});
return false;
});
......@@ -88,6 +88,10 @@ export class TerminalInstance {
this.parentDomElement.appendChild(this.wrapperElement);
}
private sanitizeInput(data: any) {
return typeof data === 'string' ? data.replace(TerminalInstance.eolRegex, os.EOL) : data;
}
public layout(dimension: Dimension): void {
if (!this.font || !this.font.charWidth || !this.font.charHeight) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册