From 04dceb93a7ea8e7edf3a114bf27ec175f13bc697 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Wed, 25 Mar 2026 17:34:18 +0800 Subject: [PATCH] fix: unify terminal scroll sensitivity defaults (#12334) Refs #11911 --- frontend/src/components/terminal/index.vue | 2 +- frontend/src/store/modules/terminal.ts | 2 +- frontend/src/views/terminal/setting/index.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/terminal/index.vue b/frontend/src/components/terminal/index.vue index a04bcc8fa..be940b8b2 100644 --- a/frontend/src/components/terminal/index.vue +++ b/frontend/src/components/terminal/index.vue @@ -115,7 +115,7 @@ const newTerm = () => { cursorBlink: terminalStore.cursorBlink ? String(terminalStore.cursorBlink).toLowerCase() === 'enable' : true, cursorStyle: terminalStore.cursorStyle ? getStyle() : 'underline', scrollback: terminalStore.scrollback || 1000, - scrollSensitivity: terminalStore.scrollSensitivity || 15, + scrollSensitivity: terminalStore.scrollSensitivity || 6, }); }; diff --git a/frontend/src/store/modules/terminal.ts b/frontend/src/store/modules/terminal.ts index 1a41482ec..d5693d485 100644 --- a/frontend/src/store/modules/terminal.ts +++ b/frontend/src/store/modules/terminal.ts @@ -14,7 +14,7 @@ export const TerminalStore = defineStore({ cursorBlink: 'enable', cursorStyle: 'underline', scrollback: 1000, - scrollSensitivity: 10, + scrollSensitivity: 6, }), actions: { setLineHeight(lineHeight: number) { diff --git a/frontend/src/views/terminal/setting/index.vue b/frontend/src/views/terminal/setting/index.vue index 43ed40116..b93d14586 100644 --- a/frontend/src/views/terminal/setting/index.vue +++ b/frontend/src/views/terminal/setting/index.vue @@ -191,7 +191,7 @@ const form = reactive({ cursorBlink: 'Enable', cursorStyle: 'underline', scrollback: 1000, - scrollSensitivity: 10, + scrollSensitivity: 6, showDefaultConn: false, defaultConn: '', }); @@ -329,7 +329,7 @@ const iniTerm = () => { cursorBlink: true, cursorStyle: 'block', scrollback: 1000, - scrollSensitivity: 15, + scrollSensitivity: 6, }); term.value.open(terminalElement.value); applyPreviewBackground();