sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit f9206dd537147aeb5015e81d11db13acc2efb2c2
parent e8af5cddb7654a41539dc26e2404ef2effde7037
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Thu,  8 Nov 2007 18:35:05 +0000

minor cleanups

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

Diffstat:
M lib/sup/buffer.rb | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
@@ -361,9 +361,7 @@ class BufferManager
         case partial#.gsub(/#{sep}+/, sep)
         when /^\s*$/
           ["", ""]
-        when /^(.+#{sep})$/
-          [$1, ""]
-        when /^(.*#{sep})?(.+?)$/
+        when /^(.*#{sep})?(.*?)$/
           [$1 || "", $2]
         else
           raise "william screwed up completion: #{partial.inspect}"
@@ -434,10 +432,8 @@ class BufferManager
     default = default_contacts.map { |s| s.to_s }.join(" ")
     default += " " unless default.empty?
     
-    recent = Index.load_contacts(AccountManager.user_emails, :num => 10).map { |c| [c.longname, c.email] }
-    contacts = ContactManager.contacts.map { |c| [ContactManager.alias_for(c), c.longname, c.email] }
-
-    Redwood::log "recent: #{recent.inspect}"
+    recent = Index.load_contacts(AccountManager.user_emails, :num => 10).map { |c| [c.full_address, c.email] }
+    contacts = ContactManager.contacts.map { |c| [ContactManager.alias_for(c), c.full_address, c.email] }
 
     completions = (recent + contacts).flatten.uniq.sort
     answer = BufferManager.ask_many_with_completions domain, question, completions, default, /\s*,\s*/