diff options
author | Canop <cano.petrole@gmail.com> | 2020-06-05 21:48:24 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-06-05 21:48:24 +0200 |
commit | fe80fc4f9e86f0603ecf39d3a3b7bae828905965 (patch) | |
tree | 8bbe7f9a991de3550cbcdb16138e3ed8240af4a8 /src/browser/browser_state.rs | |
parent | e0157567a80c4094e618e263320670a708521bac (diff) |
update website for new pattern syntax
Diffstat (limited to 'src/browser/browser_state.rs')
-rw-r--r-- | src/browser/browser_state.rs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/browser/browser_state.rs b/src/browser/browser_state.rs index 5bbb7c8..b39600f 100644 --- a/src/browser/browser_state.rs +++ b/src/browser/browser_state.rs @@ -652,15 +652,18 @@ impl AppState for BrowserState { warn!("refreshing base tree failed : {:?}", e); } // refresh the filtered tree, if any - Command::from_pattern(match self.filtered_tree { - Some(ref mut tree) => { - if let Err(e) = tree.refresh(page_height, con) { - warn!("refreshing filtered tree failed : {:?}", e); + Command::from_pattern( + match self.filtered_tree { + Some(ref mut tree) => { + if let Err(e) = tree.refresh(page_height, con) { + warn!("refreshing filtered tree failed : {:?}", e); + } + &tree.options.pattern } - &tree.options.pattern - } - None => &self.tree.options.pattern, - }) + None => &self.tree.options.pattern, + }, + con, + ) } fn get_flags(&self) -> Vec<Flag> { @@ -677,12 +680,12 @@ impl AppState for BrowserState { ] } - fn get_starting_input(&self) -> String { + fn get_starting_input(&self, con: &AppContext) -> String { if self.pending_pattern.is_some() { - self.pending_pattern.as_input() + self.pending_pattern.as_input(&con.search_modes) } else { self.filtered_tree.as_ref() - .map(|t| t.options.pattern.as_input()) + .map(|t| t.options.pattern.as_input(&con.search_modes)) .unwrap_or_else(|| String::new()) } } |