tui-canvas 0.8.1

Form/textarea for TUI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::textarea::{TextAreaDataProvider, TextAreaState};

impl<P: TextAreaDataProvider> TextAreaState<P> {
    /// Delete the active selection once. The structural behavior (remove rows vs
    /// clear in place) lives in the shared engine on `EditorCore`; the text area
    /// uses the provider's `Dynamic` policy. This wrapper only forwards the call
    /// and tracks the GUI redraw flag.
    pub(crate) fn delete_selection_once(&mut self, yank: bool) -> bool {
        let changed = self.core.delete_selection_once_dynamic(yank);
        #[cfg(feature = "gui")]
        if changed {
            self.edited_this_frame = true;
        }
        changed
    }
}