Fixed the server cli dropping new lines

This commit is contained in:
Capucho 2020-10-23 20:30:33 +01:00
parent 20ee9c77f6
commit e77cc3eae2

View File

@ -14,7 +14,8 @@ impl<'a> TuiLog<'a> {
pub fn resize(&self, h: usize) {
let mut inner = self.inner.lock().unwrap();
inner.lines.truncate(h);
let len = inner.lines.len().saturating_sub(h);
inner.lines.drain(..len);
}
}