sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit a3ccd59516f9bb72a46790754fa6189baadfae81
parent 5f475d01ead497b7f51cfb28f5f631b9ce146205
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Sun,  3 Jan 2010 09:52:21 -0500

Merge branch 'master' into next

Diffstat:
M lib/sup/mbox/loader.rb | 3 ++-
M lib/sup/util.rb | 4 ++--
M lib/sup/xapian_index.rb | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
@@ -12,7 +12,7 @@ class Loader < Source
   attr_reader :labels
 
   ## uri_or_fp is horrific. need to refactor.
-  def initialize uri_or_fp, start_offset=0, usual=true, archived=false, id=nil, labels=nil
+  def initialize uri_or_fp, start_offset=nil, usual=true, archived=false, id=nil, labels=nil
     @mutex = Mutex.new
     @labels = Set.new((labels || []) - LabelManager::RESERVED_LABELS)
 
@@ -29,6 +29,7 @@ class Loader < Source
       @path = uri_or_fp.path
     end
 
+    start_offset ||= 0
     super uri_or_fp, start_offset, usual, archived, id
   end
 
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -513,9 +513,9 @@ class Time
       strftime "%b %e"
     else
       if is_the_same_day? from
-        strftime("%l:%M%P")
+        strftime("%l:%M%p").downcase # emulate %P (missing on ruby 1.8 darwin)
       elsif is_the_day_before? from
-        "Yest."  + nearest_hour.strftime("%l%P")
+        "Yest."  + nearest_hour.strftime("%l%p").downcase # emulate %P
       else
         strftime "%b %e"
       end
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
@@ -127,7 +127,7 @@ EOS
     while not queue.empty?
       thread_id = queue.pop
       next if seen_threads.member? thread_id
-      return false if thread_killed? thread_id
+      return false if opts[:skip_killed] && thread_killed?(thread_id)
       seen_threads << thread_id
       docs = term_docids(mkterm(:thread, thread_id)).map { |x| @xapian.document x }
       docs.each do |doc|