Improved readline

This commit is contained in:
notoria
2020-07-31 18:12:38 +02:00
parent 386f7cf65d
commit ac00ae4daf

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) => {