提交 d01c7157 编写于 作者: D Daniel Imms

Ensure trailing \r on terminal sendText

Part of #22887
上级 5fd5d465
......@@ -365,8 +365,9 @@ export class TerminalInstance implements ITerminalInstance {
}
public sendText(text: string, addNewLine: boolean): void {
if (addNewLine && text.substr(text.length - os.EOL.length) !== os.EOL) {
text += os.EOL;
text = this._sanitizeInput(text);
if (addNewLine && text.substr(text.length - 1) !== '\r') {
text += '\r';
}
this._process.send({
event: 'input',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册