diff --git a/core/src/manager/finder.rs b/core/src/manager/finder.rs index b8fdec8e..0544e139 100644 --- a/core/src/manager/finder.rs +++ b/core/src/manager/finder.rs @@ -18,7 +18,7 @@ impl Finder { } pub(super) fn prev(&self, files: &Files, cursor: usize, include: bool) -> Option { - for i in include as usize ^ 1..files.len() { + for i in !include as usize..files.len() { let idx = (cursor + files.len() - i) % files.len(); if files[idx].name().is_some_and(|n| self.matches(n)) { return Some(idx as isize - cursor as isize); @@ -28,7 +28,7 @@ impl Finder { } pub(super) fn next(&self, files: &Files, cursor: usize, include: bool) -> Option { - for i in include as usize ^ 1..files.len() { + for i in !include as usize..files.len() { let idx = (cursor + i) % files.len(); if files[idx].name().is_some_and(|n| self.matches(n)) { return Some(idx as isize - cursor as isize); diff --git a/core/src/manager/tab.rs b/core/src/manager/tab.rs index 7506314f..a8a28ceb 100644 --- a/core/src/manager/tab.rs +++ b/core/src/manager/tab.rs @@ -287,7 +287,7 @@ impl Tab { finder.next(&self.current.files, self.current.cursor(), false) }; - b || step.is_some_and(|s| self.arrow(s.into())) + b | step.is_some_and(|s| self.arrow(s.into())) } pub fn search(&mut self, grep: bool) -> bool {