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:
parent
2411713501
commit
6fa5ab5eb2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user