Disable searches for '.', so that users with large monitors don't accidentally crash the terminal when searching for dot files.

This commit is contained in:
Mikayla 2024-01-12 21:11:17 -08:00
parent d2c436dcdc
commit 78858d4d11
No known key found for this signature in database

View file

@ -600,6 +600,9 @@ fn possible_open_targets(
pub fn regex_search_for_query(query: &project::search::SearchQuery) -> Option<RegexSearch> { pub fn regex_search_for_query(query: &project::search::SearchQuery) -> Option<RegexSearch> {
let query = query.as_str(); let query = query.as_str();
if query == "." {
return None;
}
let searcher = RegexSearch::new(&query); let searcher = RegexSearch::new(&query);
searcher.ok() searcher.ok()
} }