summaryrefslogtreecommitdiffstats
path: root/src/term.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.rs')
-rw-r--r--src/term.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/term.rs b/src/term.rs
index 44544aa..0469c4d 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -3,8 +3,8 @@ use crossterm::style::{Color, Print};
use crossterm::terminal::ClearType;
use crossterm::{cursor, execute, terminal};
use futures::Future;
-use std::io::stderr;
-use termimad::{CompoundStyle, LineStyle, MadSkin};
+use std::io::{stderr, Write};
+use termimad::{CompoundStyle, MadSkin};
use tokio::sync::{
oneshot,
oneshot::{error::TryRecvError, Receiver, Sender},
@@ -39,19 +39,16 @@ struct Spinner {
impl Term {
pub fn new() -> Self {
- let skin = MadSkin {
- inline_code: CompoundStyle::with_fg(Color::Cyan),
- code_block: LineStyle {
- compound_style: CompoundStyle::with_fg(Color::Cyan),
- ..Default::default()
- },
- ..Default::default()
- };
+ let mut skin = MadSkin::default();
+ skin.inline_code = CompoundStyle::with_fg(Color::Cyan);
+ skin.code_block.compound_style = CompoundStyle::with_fg(Color::Cyan);
Term { skin }
}
/// Print text to stdout
pub fn print(&self, text: &str) {
+ println!("Terminal size: {:?}", crossterm::terminal::size());
+ println!("Calling skin.print_text with: BEGIN\n{:?}\nEND", text);
self.skin.print_text(text)
}