Subject: [sup-talk] A useful contacts list trick

From: "Edward Z. Yang" <[email-masked]>
Date: Thu, 30 May 2013 15:06:35 -0700

I had always been bothered by the fact that my contacts autocomplete
would never seem to work half of the time.  I finally found out how
to vastly improve my it:

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 444589a..077dc94 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -553,7 +553,7 @@ EOS
     default = default_contacts.is_a?(String) ? default_contacts : default_contacts.map { |s| s.to_s }.join(", ")
     default += " " unless default.empty?
 
-    recent = Index.load_contacts(AccountManager.user_emails, :num => 10).map { |c| [c.full_address, c.email] }
+    recent = Index.load_contacts(AccountManager.user_emails, :num => 100).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

Hope this helps someone else out :)

Cheers,
Edward
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk