Kaynağa Gözat

better scroll speed default for windows

Aiden Cline 2 ay önce
ebeveyn
işleme
0568c943ab

+ 2 - 1
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -124,7 +124,8 @@ export function Session() {
     if (tui?.scroll_speed) {
     if (tui?.scroll_speed) {
       return new CustomSpeedScroll(tui.scroll_speed)
       return new CustomSpeedScroll(tui.scroll_speed)
     }
     }
-    return undefined
+
+    return new CustomSpeedScroll(process.platform === "win32" ? 3 : 1)
   })
   })
 
 
   createEffect(async () => {
   createEffect(async () => {

+ 1 - 1
packages/opencode/src/config/config.ts

@@ -438,7 +438,7 @@ export namespace Config {
     })
     })
 
 
   export const TUI = z.object({
   export const TUI = z.object({
-    scroll_speed: z.number().min(0.001).optional().default(1).describe("TUI scroll speed"),
+    scroll_speed: z.number().min(0.001).optional().describe("TUI scroll speed"),
     scroll_acceleration: z
     scroll_acceleration: z
       .object({
       .object({
         enabled: z.boolean().describe("Enable scroll acceleration"),
         enabled: z.boolean().describe("Enable scroll acceleration"),

+ 1 - 1
packages/web/src/content/docs/tui.mdx

@@ -347,4 +347,4 @@ You can customize TUI behavior through your OpenCode config file.
 ### Options
 ### Options
 
 
 - `scroll_acceleration` - Enable macOS-style scroll acceleration for smooth, natural scrolling. When enabled, scroll speed increases with rapid scrolling gestures and stays precise for slower movements. **This setting takes precedence over `scroll_speed` and overrides it when enabled.**
 - `scroll_acceleration` - Enable macOS-style scroll acceleration for smooth, natural scrolling. When enabled, scroll speed increases with rapid scrolling gestures and stays precise for slower movements. **This setting takes precedence over `scroll_speed` and overrides it when enabled.**
-- `scroll_speed` - Controls how fast the TUI scrolls when using scroll commands (default: `1`, minimum: `1`). **Note: This is ignored if `scroll_acceleration.enabled` is set to `true`.**
+- `scroll_speed` - Controls how fast the TUI scrolls when using scroll commands (minimum: `1`). Defaults to `1` on Unix and `3` on Windows. **Note: This is ignored if `scroll_acceleration.enabled` is set to `true`.**