par_term_config/config/config_struct/scrollback_config.rs
1//! Scrollback buffer settings for the terminal emulator.
2//!
3//! Extracted from the top-level [`super::Config`] struct via `#[serde(flatten)]`.
4//! All fields serialise at the top level of the YAML config file — existing
5//! config files remain 100% compatible.
6
7use serde::{Deserialize, Serialize};
8
9/// Scrollback buffer configuration.
10///
11/// Controls the number of lines retained in the scrollback history.
12#[derive(Debug, Clone, Serialize, Deserialize)]
13pub struct ScrollbackConfig {
14 /// Maximum number of lines to keep in scrollback buffer
15 #[serde(default = "crate::defaults::scrollback", alias = "scrollback_size")]
16 pub scrollback_lines: usize,
17}
18
19impl Default for ScrollbackConfig {
20 fn default() -> Self {
21 Self {
22 scrollback_lines: crate::defaults::scrollback(),
23 }
24 }
25}