Fix off-by-one error in measurement printing

This commit is contained in:
2021-06-05 21:17:38 -07:00
parent 3021bd025f
commit 40d1239cc1

View File

@@ -401,7 +401,7 @@ impl<S: GenericSim> Renderer<S> for ColorTermRenderer {
config: RenderConfig, config: RenderConfig,
) { ) {
let (max_w, mut max_h) = crossterm::terminal::size().unwrap(); let (max_w, mut max_h) = crossterm::terminal::size().unwrap();
max_h = max_h.saturating_sub(1 + measurements.len() as u16); max_h = max_h.saturating_sub(2 + measurements.len() as u16);
let im = RenderSteps::render_configured(state, &[], z, (max_w as _, max_h as _), config); let im = RenderSteps::render_configured(state, &[], z, (max_w as _, max_h as _), config);
let mut stdout = std::io::stdout(); let mut stdout = std::io::stdout();