pub fn handle_newline(&mut self) -> io::Result<bool> {
        if self.is_search() {
            self.accept_autosuggestion()?;
        }
        self.clear_search();
        if self.show_completions_hint.is_some() {
            self.show_completions_hint = None;
            return Ok(false);
        }

        let char_before_cursor = cur_buf!(self).char_before(self.cursor);
        if char_before_cursor == Some('\\') {
            // self.insert_after_cursor('\r')?;
            self.insert_after_cursor('\n')?;
            Ok(false)
        } else {
            self.cursor = cur_buf!(self).num_chars();
            self.no_newline = true;
            self._display(false)?;
            self.out.write_all(b"\r\n")?;
            self.show_completions_hint = None;
            Ok(true)
        }
    }
// XXX: Returning a bool to indicate doneness is a bit awkward, maybe change it
Returning a bool to indicate doneness is a bit awkward, maybe change it
Returning a bool to indicate doneness is a bit awkward maybe change it
pub fn handle_newline(&mut self) -> io::Result<bool> {
        if self.is_search() {
            self.accept_autosuggestion()?;
        }
        self.clear_search();
        if self.show_completions_hint.is_some() {
            self.show_completions_hint = None;
            return Ok(false);
        }
        let char_before_cursor = cur_buf!(self).char_before(self.cursor);
        if char_before_cursor == Some('\\') {
            // self.insert_after_cursor('\r')?;
            self.insert_after_cursor('\n')?;
            Ok(false)
        } else {
            self.cursor = cur_buf!(self).num_chars();
            self.no_newline = true;
            self._display(false)?;
            self.out.write_all(b"\r\n")?;
            self.show_completions_hint = None;
            Ok(true)
        }
    }
pub fn handle_newline ( & mut self ) -> io :: Result < bool > { if self . is_search ( ) { self . accept_autosuggestion ( ) ? ; } self . clear_search ( ) ; if self . show_completions_hint . is_some ( ) { self . show_completions_hint = None ; return Ok ( false ) ; } let char_before_cursor = cur_buf ! ( self ) . char_before ( self . cursor ) ; if char_before_cursor == Some ( '\\' ) { // self.insert_after_cursor('\r')?; self . insert_after_cursor ( '\n' ) ? ; Ok ( false ) } else { self . cursor = cur_buf ! ( self ) . num_chars ( ) ; self . no_newline = true ; self . _display ( false ) ? ; self . out . write_all ( b" \r \n " ) ? ; self . show_completions_hint = None ; Ok ( true ) } }
XXX: Returning a bool to indicate doneness is a bit awkward, maybe change it
XXX : Returning a bool to indicate doneness is a bit awkward maybe change it
&mut self
&mut self