summaryrefslogtreecommitdiffstats
path: root/src/displayable_tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayable_tree.rs')
-rw-r--r--src/displayable_tree.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/displayable_tree.rs b/src/displayable_tree.rs
index 194e7b0..f05df48 100644
--- a/src/displayable_tree.rs
+++ b/src/displayable_tree.rs
@@ -5,11 +5,9 @@ use std::os::unix::fs::MetadataExt;
use chrono::{offset::Local, DateTime};
use crossterm::{
- Color,
- Output,
cursor,
queue,
- SetBg,
+ style::{Color, SetBackgroundColor},
terminal::{Clear, ClearType},
};
use termimad::{
@@ -237,7 +235,7 @@ impl<'s, 't> DisplayableTree<'s, 't> {
}
if self.in_app {
queue!(f, Clear(ClearType::UntilNewLine))?;
- queue!(f, SetBg(Color::Reset))?; // to end selection background
+ queue!(f, SetBackgroundColor(Color::Reset))?; // to end selection background
if let Some((sctop, scbottom)) = scrollbar {
queue!(f, cursor::MoveTo(self.area.width, y))?;
let style = if sctop <= y && y <= scbottom {
@@ -248,7 +246,7 @@ impl<'s, 't> DisplayableTree<'s, 't> {
style.queue_str(f, "▐")?;
}
}
- queue!(f, Output("\r\n".to_string()))?;
+ write!(f, "\r\n")?;
}
Ok(())
}