diff --git a/crates/nu-explore/src/pager/mod.rs b/crates/nu-explore/src/pager/mod.rs index 5ea560093d..d230f8a54d 100644 --- a/crates/nu-explore/src/pager/mod.rs +++ b/crates/nu-explore/src/pager/mod.rs @@ -860,10 +860,8 @@ fn search_pattern(data: impl Iterator, pat: &str, rev: bool) -> V } } - if !rev { - matches.sort(); - } else { - matches.sort_by(|a, b| b.cmp(a)); + if rev { + matches.reverse(); } matches