mirror of
https://github.com/xvxx/phetch
synced 2024-11-12 13:10:40 +00:00
clear empty status line
This commit is contained in:
parent
16e12b6c57
commit
5a78ca16c1
13
src/ui.rs
13
src/ui.rs
@ -77,13 +77,22 @@ impl UI {
|
||||
termion::cursor::Hide,
|
||||
screen,
|
||||
);
|
||||
if status.len() > 0 {
|
||||
if status.is_empty() {
|
||||
write!(
|
||||
out,
|
||||
"{}{}{}",
|
||||
termion::cursor::Goto(1, self.rows()),
|
||||
termion::cursor::Hide,
|
||||
termion::clear::CurrentLine,
|
||||
);
|
||||
} else {
|
||||
write!(
|
||||
out,
|
||||
"{}{}{}{}",
|
||||
termion::cursor::Goto(1, self.rows()),
|
||||
status,
|
||||
termion::cursor::Show,
|
||||
termion::cursor::Hide,
|
||||
termion::clear::UntilNewline,
|
||||
);
|
||||
}
|
||||
out.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user