提交 07acfd7e 编写于 作者: D Daniel Imms

Improve terminal clear command to work with multi-line prompts

Fixes #48146
上级 45e859bf
......@@ -567,7 +567,13 @@ export class TerminalInstance implements ITerminalInstance {
}
public clear(): void {
this._xterm.clear();
if (paths.basename(this._shellLaunchConfig.executable).match(/zsh|bash/)) {
// If a supported shell is being used, clear xterm scrollback then clear shell (^L)
this._xterm.write('\x1b[3J');
this._processManager.write('\x0c');
} else {
this._xterm.clear();
}
}
private _refreshSelectionContextKey() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册