lib/sup/modes/compose-mode.rb in sup-0.4 vs lib/sup/modes/compose-mode.rb in sup-0.5
- old
+ new
@@ -18,10 +18,10 @@
BufferManager.kill_buffer self.buffer unless edited
edited
end
def self.spawn_nicely opts={}
- to = opts[:to] || BufferManager.ask_for_contacts(:people, "To: ") or return
+ to = opts[:to] || BufferManager.ask_for_contacts(:people, "To: ", [opts[:to_default]]) or return
cc = opts[:cc] || (BufferManager.ask_for_contacts(:people, "Cc: ") or return if $config[:ask_for_cc])
bcc = opts[:bcc] || (BufferManager.ask_for_contacts(:people, "Bcc: ") or return if $config[:ask_for_bcc])
subj = opts[:subj] || (BufferManager.ask(:subject, "Subject: ") or return if $config[:ask_for_subject])
mode = ComposeMode.new :from => opts[:from], :to => to, :cc => cc, :bcc => bcc, :subj => subj