config: add entry for scroll-to-bottom

Fixes #8408
pull/8412/head
Jeffrey C. Ollie 2025-08-26 18:42:24 -05:00
parent c1ab41afac
commit 31c96d906a
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 24 additions and 0 deletions

View File

@ -767,6 +767,22 @@ palette: Palette = .{},
/// the mouse is shown again when a new window, tab, or split is created. /// the mouse is shown again when a new window, tab, or split is created.
@"mouse-hide-while-typing": bool = false, @"mouse-hide-while-typing": bool = false,
/// When to scroll the surface to the bottom. The format of this is a list of
/// options to enable separated by commas. If you prefix an option with `no-`
/// then it is disabled. If you omit an option, its default value is used.
///
/// Available options:
///
/// - `keystroke` If set, scroll the surface to the bottom when the user
/// presses a key that results in data being sent to the PTY (basically
/// anything but modifiers or keybinds that are processed by Ghostty).
///
/// - `output` If set, scroll the surface to the bottom if there is new data
/// to display. (Currently unimplemented.)
///
/// The default is `keystroke, no-output`.
@"scroll-to-bottom": ScrollToBottom = .default,
/// Determines whether running programs can detect the shift key pressed with a /// Determines whether running programs can detect the shift key pressed with a
/// mouse click. Typically, the shift key is used to extend mouse selection. /// mouse click. Typically, the shift key is used to extend mouse selection.
/// ///
@ -8031,6 +8047,14 @@ pub const WindowPadding = struct {
} }
}; };
/// See scroll-to-bottom
pub const ScrollToBottom = packed struct {
keystroke: bool = true,
output: bool = false,
pub const default: ScrollToBottom = .{};
};
test "parse duration" { test "parse duration" {
inline for (Duration.units) |unit| { inline for (Duration.units) |unit| {
var buf: [16]u8 = undefined; var buf: [16]u8 = undefined;