aboutsummaryrefslogtreecommitdiff
path: root/src/display
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-12-24 23:11:19 -0800
committeriximeow <me@iximeow.net>2017-12-24 23:11:19 -0800
commit9df06af16276e3c002516836b4851be4e6e6c993 (patch)
treecffb070e4cef1baa71d968143bec5925cdbe92af /src/display
parent04072d36a1597e66d8034c98c30b76caf52c299b (diff)
parent023e4bc607760528e96d7e11214d9223ad4ff616 (diff)
Merge branch 'master' of github.com:iximeow/reifenfeuerd
Diffstat (limited to 'src/display')
-rw-r--r--src/display/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/display/mod.rs b/src/display/mod.rs
index 8bd233a..6115472 100644
--- a/src/display/mod.rs
+++ b/src/display/mod.rs
@@ -412,7 +412,7 @@ pub fn paint(tweeter: &::tw::TwitterCache, display_info: &mut DisplayInfo) -> Re
{
let to_show = display_info.log[first_tail_log..last_tail_log].iter().rev();
for line in to_show {
- print!("{}{}{}/{}: {}", cursor::Goto(1, height - i), clear::CurrentLine, display_info.log.len() - 1 - i as usize, display_info.log.len() - 1, line.take(width - 7);
+ print!("{}{}{}/{}: {}", cursor::Goto(1, height - i), clear::CurrentLine, display_info.log.len() - 1 - i as usize, display_info.log.len() - 1, line.chars().take(width.saturating_sub(7) as usize).collect::<String>());
i = i + 1;
}
}