/// Restore the stored selection range.
///
/// Return a boolean indicating whether a selection range was stored (and
/// thus restored).
Restore the stored selection range.
Return a boolean indicating whether a selection range was stored (and
thus restored).
Restore the stored selection range . Return a boolean indicating whether a selection range was stored ( and thus restored ) .
pub fn restore_selection_range(&self) -> bool {
        trace!("[compose_area] restore_selection_range");
        if let Some(ref range) = self.selection_range {
            // Get the current selection
            let selection = match self.fetch_selection() {
                Some(selection) => selection,
                None => {
                    error!("[compose_area] No selection found");
                    return false;
                }
            };
            // Restore the range
            if selection.remove_all_ranges().is_err() {
                error!("[compose_area] Removing all ranges failed");
            }
            match selection.add_range(range) {
                Ok(_) => true,
                Err(_) => {
                    error!("[compose_area] Adding range failed");
                    false
                }
            }
        } else {
            trace!("[compose_area]   No stored range");
            false
        }
    }
pub fn restore_selection_range ( & self ) -> bool { trace ! ( " " ) ; if let Some ( ref range ) = self . selection_range { // Get the current selection let selection = match self . fetch_selection ( ) { Some ( selection ) => selection , None => { error ! ( " " ) ; return false ; } } ; // Restore the range if selection . remove_all_ranges ( ) . is_err ( ) { error ! ( " " ) ; } match selection . add_range ( range ) { Ok ( _ ) => true , Err ( _ ) => { error ! ( " " ) ; false } } } else { trace ! ( " " ) ; false } }
Restore the stored selection range.
Restore the stored selection range .
&self