2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-12 13:10:40 +00:00

input is always at bottom

This commit is contained in:
dvkt 2019-12-17 18:26:47 -08:00
parent 4a4fe31bde
commit 36f1c58d8d

View File

@ -123,7 +123,11 @@ impl MenuView {
out.push('\n');
}
if self.lines().len() < rows {
out.push_str(&format!("{}", "\r\n".repeat(rows - 1 - self.lines().len())));
// fill in empty space
out.push_str(&format!(
"{}",
" \r\n".repeat(rows - 1 - self.lines().len())
));
}
out.push_str(&self.input);
out