Add scroll acceleration support to TUI (#4289)

This commit is contained in:
Tommy D. Rossi
2025-11-13 17:02:10 +01:00
committed by GitHub
parent ec3579d7cb
commit 609ab069a9
5 changed files with 61 additions and 5 deletions

View File

@@ -93,11 +93,19 @@ You can configure TUI-specific settings through the `tui` option.
{
"$schema": "https://opencode.ai/config.json",
"tui": {
"scroll_speed": 3
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
}
}
}
```
Available options:
- `scroll_acceleration.enabled` - Enable macOS-style scroll acceleration. **Takes precedence over `scroll_speed`.**
- `scroll_speed` - Custom scroll speed multiplier (default: `1`, minimum: `1`). Ignored if `scroll_acceleration.enabled` is `true`.
[Learn more about using the TUI here](/docs/tui).
---

View File

@@ -336,11 +336,15 @@ You can customize TUI behavior through your OpenCode config file.
{
"$schema": "https://opencode.ai/config.json",
"tui": {
"scroll_speed": 3
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
}
}
}
```
### Options
- `scroll_speed` - Controls how fast the TUI scrolls when using scroll commands (default: `2`, minimum: `1`)
- `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`.**