summaryrefslogtreecommitdiffstats
path: root/src/context/app_context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/context/app_context.rs')
-rw-r--r--src/context/app_context.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/context/app_context.rs b/src/context/app_context.rs
index b283783..ce4793c 100644
--- a/src/context/app_context.rs
+++ b/src/context/app_context.rs
@@ -6,13 +6,12 @@ use std::thread;
use crate::commands::quit::QuitAction;
use crate::config;
use crate::context::{
- CommandLineContext, LocalStateContext, MessageQueue, PreviewContext, TabContext, UiContext,
- WorkerContext,
+ CommandLineContext, LocalStateContext, MatchContext, MessageQueue, PreviewContext, TabContext,
+ UiContext, WorkerContext,
};
use crate::event::{AppEvent, Events};
use crate::ui::views;
use crate::ui::PreviewArea;
-use crate::util::search::SearchPattern;
use crate::Args;
use notify::{RecursiveMode, Watcher};
use std::path;
@@ -30,7 +29,7 @@ pub struct AppContext {
// context related to local file state
local_state: Option<LocalStateContext>,
// context related to searching
- search_context: Option<SearchPattern>,
+ search_context: Option<MatchContext>,
// message queue for displaying messages
message_queue: MessageQueue,
// context related to io workers
@@ -246,11 +245,11 @@ impl AppContext {
self.local_state.take()
}
- pub fn get_search_context(&self) -> Option<&SearchPattern> {
+ pub fn get_search_context(&self) -> Option<&MatchContext> {
self.search_context.as_ref()
}
- pub fn set_search_context(&mut self, pattern: SearchPattern) {
- self.search_context = Some(pattern);
+ pub fn set_search_context(&mut self, context: MatchContext) {
+ self.search_context = Some(context);
}
pub fn preview_context_ref(&self) -> &PreviewContext {