fn current_autosuggestion(&mut self) -> Option<Buffer> {
        let context_history = &self.context.history;
        let autosuggestion = if self.is_search() {
            self.search_history_loc().map(|i| &context_history[i])
        } else if self.show_autosuggestions {
            self.cur_history_loc
                .map(|i| &context_history[i])
                .or_else(|| {
                    context_history
                        .get_newest_match(Some(context_history.len()), &self.new_buf)
                        .map(|i| &context_history[i])
                })
        } else {
            None
        };
        autosuggestion.cloned()
    }
/// Returns current auto suggestion, for history search this is the current match if not
/// searching the first history entry to start with current text (reverse order).
/// Return None if nothing found.
Returns current auto suggestion, for history search this is the current match if not
searching the first history entry to start with current text (reverse order).
Return None if nothing found.
Returns current auto suggestion for history search this is the current match if not searching the first history entry to start with current text ( reverse order ) . Return None if nothing found .
fn current_autosuggestion(&mut self) -> Option<Buffer> {
        let context_history = &self.context.history;
        let autosuggestion = if self.is_search() {
            self.search_history_loc().map(|i| &context_history[i])
        } else if self.show_autosuggestions {
            self.cur_history_loc
                .map(|i| &context_history[i])
                .or_else(|| {
                    context_history
                        .get_newest_match(Some(context_history.len()), &self.new_buf)
                        .map(|i| &context_history[i])
                })
        } else {
            None
        };
        autosuggestion.cloned()
    }
fn current_autosuggestion ( & mut self ) -> Option < Buffer > { let context_history = & self . context . history ; let autosuggestion = if self . is_search ( ) { self . search_history_loc ( ) . map ( | i | & context_history [ i ] ) } else if self . show_autosuggestions { self . cur_history_loc . map ( | i | & context_history [ i ] ) . or_else ( | | { context_history . get_newest_match ( Some ( context_history . len ( ) ) , & self . new_buf ) . map ( | i | & context_history [ i ] ) } ) } else { None } ; autosuggestion . cloned ( ) }
Returns current auto suggestion, for history search this is the current match if not
searching the first history entry to start with current text (reverse order).
Returns current auto suggestion for history search this is the current match if not searching the first history entry to start with current text ( reverse order ) .
&mut self
&mut self