Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] A useful contacts list trick
@ 2013-05-30 22:06 Edward Z. Yang
  0 siblings, 0 replies; only message in thread
From: Edward Z. Yang @ 2013-05-30 22:06 UTC (permalink / raw)
  To: sup-talk

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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-30 22:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 22:06 [sup-talk] A useful contacts list trick Edward Z. Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox