summaryrefslogtreecommitdiffstats
path: root/src/widget.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-03-20 13:58:59 +0100
committerrabite <rabite@posteo.de>2019-03-20 13:58:59 +0100
commit9a711bbe96d753d0dbf70007adc0ff89823aa9ad (patch)
treef8c0fc8cf12967a5c1a5409b37f6800a050a5c27 /src/widget.rs
parentc2297ab4945d010d4106d35a34ec83314891c34f (diff)
handle long lines in status/footer
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widget.rs b/src/widget.rs
index 1610596..28e58e6 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -373,9 +373,12 @@ pub trait Widget {
}
fn show_status(&self, status: &str) -> HResult<()> {
+ let xsize = self.get_core()?.coordinates.xsize_u();
+ let sized_status = term::sized_string_u(status, xsize);
+ HError::log(status.to_string()).log();
{
let mut status_content = self.get_core()?.status_bar_content.lock()?;
- *status_content = Some(status.to_string());
+ *status_content = Some(sized_status);
}
self.draw_status()?;
Ok(())