[PR #3575] Terminal uses system default for number of rows scrolled at a time. Can be overridden in settings file. #25437

Closed
opened 2026-01-31 09:09:29 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/3575

State: closed
Merged: Yes


The terminal will use the system setting to determine the number of lines to scroll at a time.
This can be overridden by adding rowsToScroll to app global settings file.
terminal will use the system setting if the app setting is 0, or not specified. No restart is needed to reflect setting changes in system or the settings file.

The default was hardcoded to 4 in the code with a todo comment. 1 works better on precision touchpads, where 4 scrolls too fast.

  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

  1. Launch terminal
  2. cat a large file so that there are many lines to scroll in between.
  3. Launch settings editor.
  4. Add rowsToScroll: 1 to global settings, and save the file.
  5. Scroll the page, it should now go nice and slow.
  6. Change the setting to 20, and save the file.
  7. Scrolling should now be super fast.
  8. Restart the terminal, and verify that scrolling is still super fast.
  9. Set rowsToScroll to 0 in settings and save the file.
  10. Verify that scrolling happens at system setting.
  11. Change system setting to max and switch focus back to terminal to see scrolling happen very fast.
  12. Change system setting to minimum and see scrolling happen very slow.

Example of profiles.json file:


// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "rowsToScroll": 1,

    "profiles":
    [
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "hidden": false,
            "name": "PowerShell Core",
            "source": "Windows.Terminal.PowershellCore"
        },
        {
            "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
            "hidden": false,
            "name": "Ubuntu-18.04",
            "source": "Windows.Terminal.Wsl"
        }
    ],

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}

**Original Pull Request:** https://github.com/microsoft/terminal/pull/3575 **State:** closed **Merged:** Yes --- The terminal will use the system setting to determine the number of lines to scroll at a time. This can be overridden by adding rowsToScroll to app global settings file. terminal will use the system setting if the app setting is 0, or not specified. No restart is needed to reflect setting changes in system or the settings file. The default was hardcoded to 4 in the code with a todo comment. 1 works better on precision touchpads, where 4 scrolls too fast. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed 1. Launch terminal 2. cat a large file so that there are many lines to scroll in between. 3. Launch settings editor. 4. Add rowsToScroll: 1 to global settings, and save the file. 5. Scroll the page, it should now go nice and slow. 6. Change the setting to 20, and save the file. 7. Scrolling should now be super fast. 8. Restart the terminal, and verify that scrolling is still super fast. 9. Set rowsToScroll to 0 in settings and save the file. 10. Verify that scrolling happens at system setting. 11. Change system setting to max and switch focus back to terminal to see scrolling happen very fast. 12. Change system setting to minimum and see scrolling happen very slow. Example of profiles.json file: ```json // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "rowsToScroll": 1, "profiles": [ { // Make changes here to the powershell.exe profile "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { // Make changes here to the cmd.exe profile "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "cmd", "commandline": "cmd.exe", "hidden": false }, { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell Core", "source": "Windows.Terminal.PowershellCore" }, { "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "hidden": false, "name": "Ubuntu-18.04", "source": "Windows.Terminal.Wsl" } ], // Add custom color schemes to this array "schemes": [], // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [] } ```
claunia added the pull-request label 2026-01-31 09:09:29 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25437