From 36f1c58d8d9f14c083e4040b60de6614a2cdad5a Mon Sep 17 00:00:00 2001 From: dvkt Date: Tue, 17 Dec 2019 18:26:47 -0800 Subject: [PATCH] input is always at bottom --- src/menu.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/menu.rs b/src/menu.rs index 0172dd4..ce9de5f 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -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