diff --git a/src/app.rs b/src/app.rs index edd3eee..82028ef 100644 --- a/src/app.rs +++ b/src/app.rs @@ -19,7 +19,6 @@ use anyhow::{Context, Result}; use regex::Regex; use std::cmp::min; use std::sync::Arc; -use std::usize; fn get_offsets_to_make_visible( found_record: &find::FoundRecord, @@ -193,7 +192,6 @@ impl App { rows_view.headers().len(), &echo_column, ignore_case, - no_headers, ); let finder: Option = None; @@ -608,7 +606,9 @@ impl App { self.csv_table_state.update_sorter(&self.sorter); - self.csv_table_state.transient_message = self.transient_message.clone(); + self.csv_table_state + .transient_message + .clone_from(&self.transient_message); // self.csv_table_state.debug = format!("{:?}", self.sorter); diff --git a/src/ui.rs b/src/ui.rs index d1678a0..2d5b06b 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -1039,7 +1039,6 @@ pub struct CsvTableState { pub transient_message: Option, pub echo_column: Option, pub ignore_case: bool, - pub no_headers: bool, pub view_layout: Option, pub enable_line_wrap: bool, pub is_word_wrap: bool, @@ -1054,7 +1053,6 @@ impl CsvTableState { total_cols: usize, echo_column: &Option, ignore_case: bool, - no_headers: bool, ) -> Self { Self { rows_offset: 0, @@ -1075,7 +1073,6 @@ impl CsvTableState { transient_message: None, echo_column: echo_column.clone(), ignore_case, - no_headers, view_layout: None, enable_line_wrap: false, is_word_wrap: false, diff --git a/src/util/events.rs b/src/util/events.rs index f422f1b..7d6b6c4 100644 --- a/src/util/events.rs +++ b/src/util/events.rs @@ -1,6 +1,6 @@ use std::time::{Duration, Instant}; -use crossterm::event::{poll, read, Event, KeyCode, KeyEvent, KeyEventKind}; +use crossterm::event::{poll, read, Event, KeyEvent, KeyEventKind}; pub enum CsvlensEvent { Input(I), @@ -15,14 +15,12 @@ pub struct CsvlensEvents { #[derive(Debug, Clone, Copy)] pub struct Config { - pub exit_key: KeyCode, pub tick_rate: Duration, } impl Default for Config { fn default() -> Config { Config { - exit_key: KeyCode::Char('q'), tick_rate: Duration::from_millis(250), } }