From: wmorgan Date: Sat, 13 Jan 2007 00:04:21 +0000 (+0000) Subject: improved contact-list-mode X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=4ab181a0665da2112394e09cb35e7a25b68543d1;p=sup improved contact-list-mode git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@249 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/doc/TODO b/doc/TODO index 028a8c6..47b20df 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,4 +1,4 @@ -fix up contact list mode: should display while loading, and when you add an alias, should move everything else to the right +alias authors in thread-view-mode add a flag to sup-import to force the creation of a new source (see http://rubyforge.org/forum/forum.php?thread_id=10973&forum_id=10340) fix bug: when returning from a shelling out, ncurses is crazy batch deletion @@ -23,6 +23,7 @@ pop move sup-import argument handling to getopt be able to mark individual messages as spam in thread-view-mode +x fix up contact list mode: should display while loading, and when you add an alias, should move everything else to the right x fix bug: envelope-to thing still not working x fix snippet repetitions with small snippets x fix next and previous in thread-view-mode with diff --git a/lib/sup/contact.rb b/lib/sup/contact.rb index 715497b..cf30761 100644 --- a/lib/sup/contact.rb +++ b/lib/sup/contact.rb @@ -24,7 +24,7 @@ class ContactManager @people.delete oldentry.first if oldentry @people[aalias] = person end - def drop_contact person; @people.delete person; end + def drop_contact person; @people.find { |a, p| @people.delete a if p == person }; end def delete t; @people.delete t; end def resolve aalias; @people[aalias]; end diff --git a/lib/sup/modes/contact-list-mode.rb b/lib/sup/modes/contact-list-mode.rb index 6b7d0c4..174a48b 100644 --- a/lib/sup/modes/contact-list-mode.rb +++ b/lib/sup/modes/contact-list-mode.rb @@ -80,11 +80,12 @@ class ContactListMode < LineCursorMode a = BufferManager.ask(:alias, "alias for #{p.longname}: ", @user_contacts[p]) or return if a.empty? ContactManager.drop_contact p + @user_contacts.delete p else ContactManager.set_contact p, a @user_contacts[p] = a - update_text_for_line curpos end + regen_text # in case columns need to be shifted end def load_in_background