diff --git a/crates/television/app.rs b/crates/television/app.rs index 6bfc65e..cc567c4 100644 --- a/crates/television/app.rs +++ b/crates/television/app.rs @@ -197,8 +197,7 @@ impl App { _ => {} } } - return self - .config + self.config .keybindings .get(&self.mode) .and_then(|keymap| keymap.get(&keycode).cloned()) @@ -206,7 +205,7 @@ impl App { Action::AddInputChar(c) } else { Action::NoOp - }); + }) } // terminal events Event::Tick => Action::Tick, diff --git a/crates/television/tui.rs b/crates/television/tui.rs index 3aaffef..ef5cd46 100644 --- a/crates/television/tui.rs +++ b/crates/television/tui.rs @@ -15,6 +15,7 @@ use ratatui::{backend::CrosstermBackend, layout::Size}; use tokio::task::JoinHandle; use tracing::debug; +#[allow(dead_code)] pub struct Tui where W: Write, @@ -24,6 +25,7 @@ where pub terminal: ratatui::Terminal>, } +#[allow(dead_code)] impl Tui where W: Write, diff --git a/crates/television/ui.rs b/crates/television/ui.rs index 22297b6..254faf3 100644 --- a/crates/television/ui.rs +++ b/crates/television/ui.rs @@ -22,14 +22,14 @@ const DEFAULT_RESULT_NAME_FG: Color = Color::Blue; const DEFAULT_RESULT_PREVIEW_FG: Color = Color::Rgb(150, 150, 150); const DEFAULT_RESULT_LINE_NUMBER_FG: Color = Color::Yellow; // input -const DEFAULT_INPUT_FG: Color = Color::Rgb(200, 200, 200); -const DEFAULT_RESULTS_COUNT_FG: Color = Color::Rgb(150, 150, 150); +//const DEFAULT_INPUT_FG: Color = Color::Rgb(200, 200, 200); +//const DEFAULT_RESULTS_COUNT_FG: Color = Color::Rgb(150, 150, 150); // preview -const DEFAULT_PREVIEW_TITLE_FG: Color = Color::Blue; -const DEFAULT_SELECTED_PREVIEW_BG: Color = Color::Rgb(50, 50, 50); -const DEFAULT_PREVIEW_CONTENT_FG: Color = Color::Rgb(150, 150, 180); -const DEFAULT_PREVIEW_GUTTER_FG: Color = Color::Rgb(70, 70, 70); -const DEFAULT_PREVIEW_GUTTER_SELECTED_FG: Color = Color::Rgb(255, 150, 150); +//const DEFAULT_PREVIEW_TITLE_FG: Color = Color::Blue; +//const DEFAULT_SELECTED_PREVIEW_BG: Color = Color::Rgb(50, 50, 50); +//const DEFAULT_PREVIEW_CONTENT_FG: Color = Color::Rgb(150, 150, 180); +//const DEFAULT_PREVIEW_GUTTER_FG: Color = Color::Rgb(70, 70, 70); +//const DEFAULT_PREVIEW_GUTTER_SELECTED_FG: Color = Color::Rgb(255, 150, 150); pub fn get_border_style(focused: bool) -> Style { if focused { diff --git a/crates/television/ui/input/backend.rs b/crates/television/ui/input/backend.rs index 3a0b3b7..c17bf62 100644 --- a/crates/television/ui/input/backend.rs +++ b/crates/television/ui/input/backend.rs @@ -40,6 +40,7 @@ pub fn to_input_request(evt: &CrosstermEvent) -> Option { } } +#[allow(unused)] /// Import this trait to implement `Input::handle_event()` for crossterm. pub trait EventHandler { /// Handle crossterm event.