summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-11-25 01:16:21 -0600
committerAiden Cline <[email protected]>2025-11-25 01:16:21 -0600
commit0568c943abc1acb3ac7999373ebeca4f89ac0176 (patch)
treef650e55e46f4e25bd33b021d048491f919e87da6
parentb1aaa8570eabbec4ad0aafd988ebdd0b33f26f26 (diff)
downloadopencode-0568c943abc1acb3ac7999373ebeca4f89ac0176.tar.gz
opencode-0568c943abc1acb3ac7999373ebeca4f89ac0176.zip
better scroll speed default for windows
-rw-r--r--packages/opencode/src/cli/cmd/tui/routes/session/index.tsx3
-rw-r--r--packages/opencode/src/config/config.ts2
-rw-r--r--packages/web/src/content/docs/tui.mdx2
3 files changed, 4 insertions, 3 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
index 6a23e97cc..f8526e72b 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
@@ -124,7 +124,8 @@ export function Session() {
if (tui?.scroll_speed) {
return new CustomSpeedScroll(tui.scroll_speed)
}
- return undefined
+
+ return new CustomSpeedScroll(process.platform === "win32" ? 3 : 1)
})
createEffect(async () => {
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 779a4e8e2..a63b1537a 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -438,7 +438,7 @@ export namespace Config {
})
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
.object({
enabled: z.boolean().describe("Enable scroll acceleration"),
diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdx
index f50409c41..a580a4ce8 100644
--- a/packages/web/src/content/docs/tui.mdx
+++ b/packages/web/src/content/docs/tui.mdx
@@ -347,4 +347,4 @@ You can customize TUI behavior through your OpenCode config file.
### 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_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`.**