提交 6fa5ab5e 编写于 作者: E Eugene Pankov

scroll terminal to bottom on user input

上级 24117135
......@@ -292,6 +292,7 @@ export class TerminalTabComponent extends BaseTabComponent {
sendInput (data: string) {
this.session.write(data)
this.frontend.scrollToBottom()
}
write (data: string) {
......
......@@ -52,6 +52,7 @@ export abstract class Frontend {
abstract write (data: string): void
abstract clear (): void
abstract visualBell (): void
abstract scrollToBottom (): void
abstract configure (configStore: any): void
abstract setZoom (zoom: number): void
......
......@@ -141,6 +141,10 @@ export class HTermFrontend extends Frontend {
}, 125)
}
scrollToBottom (): void {
this.term.scrollEnd()
}
private setFontSize () {
preferenceManager.set('font-size', this.configuredFontSize * Math.pow(1.1, this.zoom))
}
......
......@@ -77,6 +77,10 @@ export class XTermFrontend extends Frontend {
(this.xterm as any).bell()
}
scrollToBottom (): void {
this.xterm.scrollToBottom()
}
configure (config: any): void {
this.xterm.setOption('fontFamily', `"${config.terminal.font}", "monospace-fallback", monospace`)
this.xterm.setOption('bellStyle', config.terminal.bell)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册