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
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
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'
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!"