1use settings::Settings;
 2
 3/// Settings for configuring REPL display and behavior.
 4#[derive(Clone, Debug)]
 5pub struct ReplSettings {
 6    /// Maximum number of lines to keep in REPL's scrollback buffer.
 7    /// Clamped with [4, 256] range.
 8    ///
 9    /// Default: 32
10    pub max_lines: usize,
11    /// Maximum number of columns to keep in REPL's scrollback buffer.
12    /// Clamped with [20, 512] range.
13    ///
14    /// Default: 128
15    pub max_columns: usize,
16}
17
18impl Settings for ReplSettings {
19    fn from_settings(content: &settings::SettingsContent) -> Self {
20        let repl = content.repl.as_ref().unwrap();
21
22        Self {
23            max_lines: repl.max_lines.unwrap(),
24            max_columns: repl.max_columns.unwrap(),
25        }
26    }
27}