ratatui_toolkit/widgets/code_diff/foundation/diff_config/methods/
gutter_width.rs

1use crate::widgets::code_diff::diff_config::DiffConfig;
2
3impl DiffConfig {
4    /// Sets the width of the gutter column.
5    ///
6    /// The gutter displays the +/- markers for each line.
7    ///
8    /// # Arguments
9    ///
10    /// * `width` - The gutter width in characters
11    ///
12    /// # Returns
13    ///
14    /// Self for method chaining
15    ///
16    /// # Example
17    ///
18    /// ```rust
19    /// use ratatui_toolkit::code_diff::DiffConfig;
20    ///
21    /// let config = DiffConfig::new().gutter_width(3);
22    /// ```
23    pub fn gutter_width(mut self, width: u16) -> Self {
24        self.gutter_width = width;
25        self
26    }
27}