|
|
|
@ -140,7 +140,12 @@ public partial class MainForm : Form |
|
|
|
|
|
|
|
|
|
// sort the search results |
|
|
|
|
results.Sort( (lhs, rhs) => { |
|
|
|
|
return (lhs.Item2 == rhs.Item2) ? 0 : (lhs.Item2 > rhs.Item2) ? -1 : +1 ; |
|
|
|
|
if ( lhs.Item2 < rhs.Item2 ) |
|
|
|
|
return +1 ; |
|
|
|
|
else if ( lhs.Item2 > rhs.Item2 ) |
|
|
|
|
return -1 ; |
|
|
|
|
// NOTE: We also sort by caption/filename to handle things like "foo-1" vs. "foo-2". |
|
|
|
|
return String.Compare( lhs.Item1.caption(), rhs.Item1.caption() ) ; |
|
|
|
|
} ) ; |
|
|
|
|
if ( searchQuery != "" && logger.IsInfoEnabled ) { |
|
|
|
|
if ( results.Count > 0 ) { |
|
|
|
|