mirror of
https://github.com/helix-editor/nucleo.git
synced 2025-10-05 23:32:41 +02:00
also sort results for empty patterns
there are no scores in this case, but it still makes tiebreak handling more consistent
This commit is contained in:
committed by
Pascal Kuthe
parent
d0d6b3a584
commit
61f2a4e482
@@ -166,7 +166,10 @@ impl<T: Sync + Send + 'static> Worker<T> {
|
||||
if self.pattern.is_empty() {
|
||||
self.reset_matches();
|
||||
self.process_new_items_trivial();
|
||||
if self.should_notify.load(atomic::Ordering::Relaxed) {
|
||||
let canceled = self.sort_matches();
|
||||
if canceled {
|
||||
self.was_canceled = true;
|
||||
} else if self.should_notify.load(atomic::Ordering::Relaxed) {
|
||||
(self.notify)();
|
||||
}
|
||||
return;
|
||||
|
Reference in New Issue
Block a user