sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d9cb9b4e7f2b1414578d5d8d56951173906e4507
parent 582a71943602917f0b8671b522b6dc5b171f82b0
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Wed, 29 Nov 2006 19:01:31 +0000

bugfixes: offset doesn't need to be +1, and message refs should be uniq'd
before being added to the index


git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@52 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M bin/sup-import | 1 -
M lib/sup/index.rb | 2 +-
M lib/sup/mbox/loader.rb | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/bin/sup-import b/bin/sup-import
@@ -54,7 +54,6 @@ The following options can also be specified:
   --optimize:      optimize the index after adding any new messages.
   --help:          don't do anything, just show this message.
 EOS
-#' stupid ruby-mode
   exit
 end
 
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -238,7 +238,7 @@ class Index
       :from => m.from ? m.from.email : "",
       :to => (m.to + m.cc + m.bcc).map { |x| x.email }.join(" "),
       :subject => wrap_subj(Message.normalize_subj(m.subj)),
-      :refs => (m.refs + m.replytos).join(" "),
+      :refs => (m.refs + m.replytos).uniq.join(" "),
     }
 
     @index.add_document d
diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
@@ -85,7 +85,7 @@ class Loader
       next_end_offset = @f.tell
       while(line = @f.gets)
         break if line =~ BREAK_RE
-        next_end_offset = @f.tell + 1
+        next_end_offset = @f.tell
       end
     end