terminal: Make alternate_scroll on by default (#27302)

Most terminal emulators, like macOS Terminal, Alacritty, and Ghostty,
have alternate scroll turned on by default. I think it makes sense for
the Zed terminal to do the same and make it more of an opt-out feature.

Release Notes:

- N/A
This commit is contained in:
Smit Barmase 2025-03-22 17:56:19 +05:30 committed by GitHub
parent 9918b6cade
commit b5e5959339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -1012,7 +1012,7 @@
// "alternate_scroll": "on", // "alternate_scroll": "on",
// 2. Default alternate scroll mode to off // 2. Default alternate scroll mode to off
// "alternate_scroll": "off", // "alternate_scroll": "off",
"alternate_scroll": "off", "alternate_scroll": "on",
// Set whether the option key behaves as the meta key. // Set whether the option key behaves as the meta key.
// May take 2 values: // May take 2 values:
// 1. Rely on default platform handling of option key, on macOS // 1. Rely on default platform handling of option key, on macOS

View file

@ -181,7 +181,7 @@ pub struct TerminalSettingsContent {
/// presses when in the alternate screen (e.g. when running applications /// presses when in the alternate screen (e.g. when running applications
/// like vim or less). The terminal can still set and unset this mode. /// like vim or less). The terminal can still set and unset this mode.
/// ///
/// Default: off /// Default: on
pub alternate_scroll: Option<AlternateScroll>, pub alternate_scroll: Option<AlternateScroll>,
/// Sets whether the option key behaves as the meta key. /// Sets whether the option key behaves as the meta key.
/// ///

View file

@ -2104,7 +2104,7 @@ List of `integer` column numbers
```json ```json
{ {
"terminal": { "terminal": {
"alternate_scroll": "off", "alternate_scroll": "on",
"blinking": "terminal_controlled", "blinking": "terminal_controlled",
"copy_on_select": false, "copy_on_select": false,
"dock": "bottom", "dock": "bottom",
@ -2147,7 +2147,7 @@ List of `integer` column numbers
- Description: Set whether Alternate Scroll mode (DECSET code: `?1007`) is active by default. Alternate Scroll mode converts mouse scroll events into up / down key presses when in the alternate screen (e.g. when running applications like vim or less). The terminal can still set and unset this mode with ANSI escape codes. - Description: Set whether Alternate Scroll mode (DECSET code: `?1007`) is active by default. Alternate Scroll mode converts mouse scroll events into up / down key presses when in the alternate screen (e.g. when running applications like vim or less). The terminal can still set and unset this mode with ANSI escape codes.
- Setting: `alternate_scroll` - Setting: `alternate_scroll`
- Default: `off` - Default: `on`
**Options** **Options**