ratatui_toolkit/widgets/markdown_widget/state/scroll_state/methods/
line_up.rs

1//! Line up method for ScrollState.
2
3use crate::widgets::markdown_widget::state::scroll_state::ScrollState;
4
5impl ScrollState {
6    /// Move current line up (for keyboard navigation).
7    pub fn line_up(&mut self) {
8        if self.current_line > 1 {
9            self.current_line -= 1;
10        }
11        self.adjust_scroll_for_current_line();
12    }
13}