diff --git a/src/search.rs b/src/search.rs index 7ec6c25..9c752bc 100644 --- a/src/search.rs +++ b/src/search.rs @@ -222,8 +222,8 @@ impl SearchQuery { #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum SearchMode { #[default] - PathAndContent, FileNameOnly, + PathAndContent, IncludeDocContent, } @@ -253,7 +253,7 @@ impl SearchConfig { paths, patterns, queries: vec![SearchQuery::new()], - mode: SearchMode::PathAndContent, + mode: SearchMode::default(), } } diff --git a/tests/search_tests.rs b/tests/search_tests.rs index 4279421..983bf06 100644 --- a/tests/search_tests.rs +++ b/tests/search_tests.rs @@ -53,6 +53,7 @@ fn test_search_content() { "".to_string(), ); config.queries[0].query = "Rust".to_string(); + config.mode = SearchMode::PathAndContent; let pending = spawn_search(&config).unwrap(); @@ -90,6 +91,7 @@ fn test_search_ignore_case() { "".to_string(), ); config.queries[0].query = "case".to_string(); + config.mode = SearchMode::PathAndContent; let pending = spawn_search(&config).unwrap(); @@ -121,6 +123,7 @@ fn test_search_korean_utf8() { "".to_string(), ); config.queries[0].query = "안녕".to_string(); + config.mode = SearchMode::PathAndContent; let pending = spawn_search(&config).unwrap();