]> git.cworth.org Git - sup/blobdiff - bin/sup
Allow thread index view to sort oldest first
[sup] / bin / sup
diff --git a/bin/sup b/bin/sup
index 5049879cd16432661bb46fb8176b008f89c1eab2..43a26fca4127cdc227c1cc6ee356d74ac9d1e8c7 100755 (executable)
--- a/bin/sup
+++ b/bin/sup
@@ -205,13 +205,13 @@ begin
   end
 
   if $opts[:search]
-    SearchResultsMode.spawn_from_query $opts[:search]
+    SearchResultsMode.spawn_from_query $opts[:search], true
   end
 
   until Redwood::exceptions.nonempty? || $die
     c = begin
       Ncurses.nonblocking_getch
-    rescue Interrupt => e
+    rescue Interrupt
       raise if BufferManager.ask_yes_or_no "Die ungracefully now?"
       BufferManager.draw_screen
       nil
@@ -267,9 +267,9 @@ begin
     when :search
       query = BufferManager.ask :search, "search all messages: "
       next unless query && query !~ /^\s*$/
-      SearchResultsMode.spawn_from_query query
+      SearchResultsMode.spawn_from_query query, true
     when :search_unread
-      SearchResultsMode.spawn_from_query "is:unread"
+      SearchResultsMode.spawn_from_query "is:unread", InboxMode.newest_first
     when :list_labels
       labels = LabelManager.all_labels.map { |l| LabelManager.string_for l }
       user_label = bm.ask_with_completions :label, "Show threads with label (enter for listing): ", labels