summaryrefslogtreecommitdiffstats
path: root/src/commands/search.rs
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2021-04-29 23:51:26 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2021-04-29 23:59:22 -0400
commit49758f09f45b39845ede9626fe0ca4f3eedf6698 (patch)
tree685618e2f6056a5b2abb9e973b75c2eaf7a9496d /src/commands/search.rs
parent32a40e37c16f867d76642fd791eb996a37ef3f6b (diff)
rename some structs that start with Joshuto to App
- reduce sharing global variables between modules
Diffstat (limited to 'src/commands/search.rs')
-rw-r--r--src/commands/search.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/search.rs b/src/commands/search.rs
index ba18779..ed0d6ca 100644
--- a/src/commands/search.rs
+++ b/src/commands/search.rs
@@ -1,6 +1,6 @@
use globset::GlobMatcher;
-use crate::context::JoshutoContext;
+use crate::context::AppContext;
use crate::error::JoshutoResult;
use super::cursor_move;
@@ -13,7 +13,7 @@ pub enum SearchPattern {
String(String),
}
-pub fn search_next(context: &mut JoshutoContext) -> JoshutoResult<()> {
+pub fn search_next(context: &mut AppContext) -> JoshutoResult<()> {
if let Some(s) = context.get_search_state() {
let index = match s {
SearchPattern::Glob(s) => {
@@ -30,7 +30,7 @@ pub fn search_next(context: &mut JoshutoContext) -> JoshutoResult<()> {
Ok(())
}
-pub fn search_prev(context: &mut JoshutoContext) -> JoshutoResult<()> {
+pub fn search_prev(context: &mut AppContext) -> JoshutoResult<()> {
if let Some(s) = context.get_search_state() {
let index = match s {
SearchPattern::Glob(s) => {