bin/sup in sup-0.0.4 vs bin/sup in sup-0.0.5

- old
+ new

@@ -98,11 +98,11 @@ log "ready for (inter)action!" Logger.make_buf bm.draw_screen - imode.load_more_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread { sleep 1; PollManager.poll } } + imode.load_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread { sleep 1; PollManager.poll } } PollManager.start_thread until $exception bm.draw_screen @@ -127,22 +127,23 @@ when :kill_buffer bm.kill_buffer bm.focus_buf if bm.focus_buf.mode.killable? when :list_buffers bm.spawn_unless_exists("Buffer List") { BufferListMode.new } when :list_contacts - bm.spawn_unless_exists("Contact List") { ContactListMode.new } + b = bm.spawn_unless_exists("Contact List") { ContactListMode.new } + b.mode.load_more b.content_height when :search text = bm.ask :search, "query: " next unless text && text !~ /^\s*$/ begin qobj = Index.parse_user_query_string text short_text = text.length < 20 ? text : text[0 ... 20] + "..." log "built query from #{text.inspect}: #{qobj}" mode = SearchResultsMode.new qobj bm.spawn "search: \"#{short_text}\"", mode - mode.load_more_threads :num => mode.buffer.content_height + mode.load_threads :num => mode.buffer.content_height rescue Ferret::QueryParser::QueryParseException => e bm.flash "Couldn't parse query." end when :list_labels @@ -160,15 +161,17 @@ when 0 bm.flash "No draft messages." when 1 m = nil Index.each_id_by_date(:label => :draft) { |mid, builder| m = builder.call } - BufferManager.spawn "Edit message", ResumeMode.new(m) + r = ResumeMode.new(m) + BufferManager.spawn "Edit message", r + r.edit else b = BufferManager.spawn_unless_exists(:draft) do mode = LabelSearchResultsMode.new [:draft] end - b.mode.load_more_threads :num => b.content_height + b.mode.load_threads :num => b.content_height end when :nothing when :redraw bm.completely_redraw_screen else