diff options
author | rabite <rabite@posteo.de> | 2019-03-10 12:55:56 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-03-10 12:55:56 +0100 |
commit | 9fcc12f464132d75660f331de5588ba454327fa3 (patch) | |
tree | 027eb5bdf2dcfd8667540dab7b6fed25c0a01d56 /src/proclist.rs | |
parent | e1a9d62b16647c10297269c077c177067cf2d517 (diff) |
crash fix
Diffstat (limited to 'src/proclist.rs')
-rw-r--r-- | src/proclist.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proclist.rs b/src/proclist.rs index acacf2e..eac107c 100644 --- a/src/proclist.rs +++ b/src/proclist.rs @@ -172,10 +172,9 @@ impl ListView<Vec<Process>> { Ok(format!( "{}{}{}{}{}{}", termion::cursor::Save, - format!("{}{}{:padding$}{}", + format!("{}{:padding$}{}", term::normal_color(), &sized_string, - " ", term::normal_color(), padding = padding as usize), termion::cursor::Restore, @@ -271,6 +270,7 @@ impl ProcView { } pub fn remove_proc(&mut self) -> HResult<()> { + if self.get_listview().content.len() == 0 { return Ok(()) } self.get_listview().remove_proc()?; self.get_textview().change_to(Box::new(move |_, core| { let mut textview = TextView::new_blank(&core); |