1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-27 10:42:35 +03:00

scroll terminal to bottom on user input

This commit is contained in:
Eugene Pankov 2018-09-20 12:12:57 +02:00
parent 2411713501
commit 6fa5ab5eb2
4 changed files with 10 additions and 0 deletions

View File

@ -292,6 +292,7 @@ export class TerminalTabComponent extends BaseTabComponent {
sendInput (data: string) {
this.session.write(data)
this.frontend.scrollToBottom()
}
write (data: string) {

View File

@ -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

View File

@ -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))
}

View File

@ -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)