mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: make help items filtering case-insensitive, close #275
This commit is contained in:
parent
89e56cd0b2
commit
e6fb999d1b
1 changed files with 4 additions and 3 deletions
|
|
@ -33,8 +33,9 @@ impl Control {
|
|||
|
||||
#[inline]
|
||||
pub fn contains(&self, s: &str) -> bool {
|
||||
self.desc.as_ref().map(|d| d.contains(s)) == Some(true)
|
||||
|| self.exec().contains(s)
|
||||
|| self.on().contains(s)
|
||||
let s = s.to_lowercase();
|
||||
self.desc.as_ref().map(|d| d.to_lowercase().contains(&s)) == Some(true)
|
||||
|| self.exec().to_lowercase().contains(&s)
|
||||
|| self.on().to_lowercase().contains(&s)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue