]> git.cworth.org Git - sup/commitdiff
various minor bugfixes
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 20 Jun 2007 16:15:23 +0000 (16:15 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 20 Jun 2007 16:15:23 +0000 (16:15 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@465 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup
lib/sup/modes/thread-index-mode.rb
lib/sup/modes/thread-view-mode.rb

diff --git a/bin/sup b/bin/sup
index ce7d24bb40b7d7270938b12e37b94d5fefaaf7c1..83f1e1d8614f4948e99a7eabc4b74e89ef8aceb9 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -168,7 +168,7 @@ begin
     end if s.respond_to? :connect
   end
 
-  imode.load_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 } unless $opts[:no_threads] }
 
   unless $opts[:no_threads]
     PollManager.start
index 33e2062e1ca9cceb98fa6e314fb602f8dc6fbad2..73c9ddaf0c59dc8fb4c79914aac53cd905005b66 100644 (file)
@@ -447,8 +447,8 @@ protected
   end
 
   def text_for_thread t
-    date = t.date.to_nice_s(Time.now)
-    from = author_text_for_thread(t)
+    date = t.date.to_nice_s
+    from = author_text_for_thread t
     if from.length > @from_width
       from = from[0 ... (@from_width - 1)]
       from += "." unless from[-1] == ?\s
index a088c06bc482663252ecd2a3ef20dafcaacb3c27..255b2bf8cc5cbbeb6b8503b4845f1f1d19828c19 100644 (file)
@@ -18,7 +18,7 @@ class ThreadViewMode < LineCursorMode
     k.add :show_header, "Show full message header", 'H'
     k.add :toggle_expanded, "Expand/collapse item", :enter
     k.add :expand_all_messages, "Expand/collapse all messages", 'E'
-    k.add :edit_message, "Edit message (drafts only)", 'e'
+    k.add :edit_draft, "Edit draft", 'e'
     k.add :expand_all_quotes, "Expand/collapse all quotes in a message", 'o'
     k.add :jump_to_next_open, "Jump to next open message", 'n'
     k.add :jump_to_prev_open, "Jump to previous open message", 'p'
@@ -184,11 +184,12 @@ class ThreadViewMode < LineCursorMode
     end
   end
 
-  def edit_message
+  def edit_draft
     m = @message_lines[curpos] or return
     if m.is_draft?
       mode = ResumeMode.new m
       BufferManager.spawn "Edit message", mode
+      BufferManager.kill_buffer self.buffer
       mode.edit
     else
       BufferManager.flash "Not a draft message!"