pub fn move_down(&mut self) -> io::Result<()> {
        if self.is_search() {
            self.search(true)
        } else {
            if self.new_buf.num_chars() > 0 {
                if let Some(i) = self.history_subset_loc {
                    if i < self.history_subset_index.len()-1 {
                        self.history_subset_loc = Some(i + 1);
                        self.cur_history_loc = Some(self.history_subset_index[i + 1]);
                    } else {
                        self.cur_history_loc = None;
                        self.history_subset_loc = None;
                        self.history_subset_index.clear();
                    }
                }
            } else {
                match self.cur_history_loc.take() {
                    Some(i) if i < self.context.history.len() - 1 => self.cur_history_loc = Some(i + 1),
                    _ => ()
                }
            }
            self.move_cursor_to_end_of_line()
        }
    }
/// Move down (forwards) in history, or to the new buffer if we reach the end of history.
Move down (forwards) in history, or to the new buffer if we reach the end of history.
Move down ( forwards ) in history or to the new buffer if we reach the end of history .
pub fn move_down(&mut self) -> io::Result<()> {
        if self.is_search() {
            self.search(true)
        } else {
            if self.new_buf.num_chars() > 0 {
                if let Some(i) = self.history_subset_loc {
                    if i < self.history_subset_index.len()-1 {
                        self.history_subset_loc = Some(i + 1);
                        self.cur_history_loc = Some(self.history_subset_index[i + 1]);
                    } else {
                        self.cur_history_loc = None;
                        self.history_subset_loc = None;
                        self.history_subset_index.clear();
                    }
                }
            } else {
                match self.cur_history_loc.take() {
                    Some(i) if i < self.context.history.len() - 1 => self.cur_history_loc = Some(i + 1),
                    _ => ()
                }
            }
            self.move_cursor_to_end_of_line()
        }
    }
pub fn move_down ( & mut self ) -> io :: Result < ( ) > { if self . is_search ( ) { self . search ( true ) } else { if self . new_buf . num_chars ( ) > 0 { if let Some ( i ) = self . history_subset_loc { if i < self . history_subset_index . len ( ) - 1 { self . history_subset_loc = Some ( i + 1 ) ; self . cur_history_loc = Some ( self . history_subset_index [ i + 1 ] ) ; } else { self . cur_history_loc = None ; self . history_subset_loc = None ; self . history_subset_index . clear ( ) ; } } } else { match self . cur_history_loc . take ( ) { Some ( i ) if i < self . context . history . len ( ) - 1 => self . cur_history_loc = Some ( i + 1 ) , _ => ( ) } } self . move_cursor_to_end_of_line ( ) } }
Move down (forwards) in history, or to the new buffer if we reach the end of history.
Move down ( forwards ) in history or to the new buffer if we reach the end of history .
&mut self
&mut self