Skip to content

Commit

Permalink
fix #207 color config not working for header
Browse files Browse the repository at this point in the history
  • Loading branch information
lotabout committed Aug 2, 2019
1 parent 7323974 commit b3fe950
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ impl Header {
self
}

pub fn theme(mut self, theme: Arc<ColorTheme>) -> Self {
self.theme = theme;
self
}

pub fn with_options(mut self, options: &SkimOptions) -> Self {
if let Some(tabstop_str) = options.tabstop {
let tabstop = tabstop_str.parse::<usize>().unwrap_or(8);
Expand Down
5 changes: 4 additions & 1 deletion src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ impl Model {
let selection = Selection::with_options(options).theme(theme.clone());
let matcher = Matcher::with_options(options);
let item_pool = Arc::new(ItemPool::new().lines_to_reserve(options.header_lines));
let header = Header::empty().with_options(options).item_pool(item_pool.clone());
let header = Header::empty()
.with_options(options)
.item_pool(item_pool.clone())
.theme(theme.clone());

let margins = options
.margin
Expand Down

0 comments on commit b3fe950

Please sign in to comment.