diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-12-24 23:11:19 -0800 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-12-24 23:11:19 -0800 |
commit | 4da61b2df85741860e65416a7dd5e06bef688fd3 (patch) | |
tree | cffb070e4cef1baa71d968143bec5925cdbe92af /src/display | |
parent | 042143212ae16bc12e632d6361d01ceefb0ddb96 (diff) | |
parent | 575b6858a5849547acfe43a783ef03146a373215 (diff) |
Merge branch 'master' of github.com:iximeow/reifenfeuerd
Diffstat (limited to 'src/display')
-rw-r--r-- | src/display/mod.rs | 2 |
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; } } |