Merge pull request #647 from notoria/newline

Improved readline
This commit is contained in:
Mark Thom
2020-07-31 18:19:12 -03:00
committed by GitHub

View File

@@ -67,7 +67,10 @@ pub mod readline {
} }
} }
*self.pending_input.get_mut() += "\n"; if self.pending_input.get_ref().chars().last() != Some('\n')
{
*self.pending_input.get_mut() += "\n";
}
self.pending_input.read(buf) self.pending_input.read(buf)
} }
Err(ReadlineError::Eof) => { Err(ReadlineError::Eof) => {