mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 22:14:55 +00:00
make scroll-on-input behaviour configurable (fixes #543)
This commit is contained in:
@@ -83,6 +83,15 @@ h3.mb-3 Terminal
|
|||||||
(ngModelChange)='config.save()',
|
(ngModelChange)='config.save()',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.form-line
|
||||||
|
.header
|
||||||
|
.title Scroll on input
|
||||||
|
.description Scrolls the terminal to the bottom on user input
|
||||||
|
toggle(
|
||||||
|
[(ngModel)]='config.store.terminal.scrollOnInput',
|
||||||
|
(ngModelChange)='config.save()',
|
||||||
|
)
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
.header
|
.header
|
||||||
.title Use Alt key as the Meta key
|
.title Use Alt key as the Meta key
|
||||||
|
@@ -264,9 +264,9 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
let wheelDeltaY = 0
|
let wheelDeltaY = 0
|
||||||
|
|
||||||
if ('wheelDeltaY' in event) {
|
if ('wheelDeltaY' in event) {
|
||||||
wheelDeltaY = (event as MouseWheelEvent)["wheelDeltaY"]
|
wheelDeltaY = (event as MouseWheelEvent).wheelDeltaY
|
||||||
} else {
|
} else {
|
||||||
wheelDeltaY = (event as MouseWheelEvent)["deltaY"]
|
wheelDeltaY = (event as MouseWheelEvent).deltaY
|
||||||
}
|
}
|
||||||
if (event.ctrlKey || event.metaKey) {
|
if (event.ctrlKey || event.metaKey) {
|
||||||
|
|
||||||
@@ -300,7 +300,9 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
|
|
||||||
sendInput (data: string) {
|
sendInput (data: string) {
|
||||||
this.session.write(data)
|
this.session.write(data)
|
||||||
this.frontend.scrollToBottom()
|
if (this.config.store.terminal.scrollOnInput) {
|
||||||
|
this.frontend.scrollToBottom()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
write (data: string) {
|
write (data: string) {
|
||||||
|
@@ -21,6 +21,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
customShell: '',
|
customShell: '',
|
||||||
rightClick: 'menu',
|
rightClick: 'menu',
|
||||||
copyOnSelect: false,
|
copyOnSelect: false,
|
||||||
|
scrollOnInput: true,
|
||||||
workingDirectory: '',
|
workingDirectory: '',
|
||||||
altIsMeta: false,
|
altIsMeta: false,
|
||||||
colorScheme: {
|
colorScheme: {
|
||||||
|
@@ -72,6 +72,8 @@ export class HTermFrontend extends Frontend {
|
|||||||
preferenceManager.set('pass-alt-number', true)
|
preferenceManager.set('pass-alt-number', true)
|
||||||
preferenceManager.set('cursor-blink', config.terminal.cursorBlink)
|
preferenceManager.set('cursor-blink', config.terminal.cursorBlink)
|
||||||
preferenceManager.set('clear-selection-after-copy', true)
|
preferenceManager.set('clear-selection-after-copy', true)
|
||||||
|
preferenceManager.set('scroll-on-output', false)
|
||||||
|
preferenceManager.set('scroll-on-keystroke', config.terminal.scrollOnInput)
|
||||||
|
|
||||||
if (config.terminal.colorScheme.foreground) {
|
if (config.terminal.colorScheme.foreground) {
|
||||||
preferenceManager.set('foreground-color', config.terminal.colorScheme.foreground)
|
preferenceManager.set('foreground-color', config.terminal.colorScheme.foreground)
|
||||||
|
Reference in New Issue
Block a user