commit a1e3492d471e82ce775d017adfb9dd1ec4299328
parent a301c8d37436653a504f0271bce647baa9848a0b
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Tue, 3 Apr 2007 15:55:36 +0000
better 'saving thread' messages
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@374 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -241,12 +241,12 @@ class ThreadIndexMode < LineCursorMode
end
def save
- threads = @threads + @hidden_threads.keys
+ dirty_threads = (@threads + @hidden_threads.keys).select { |t| t.dirty? }
+ return if dirty_threads.empty?
BufferManager.say("Saving threads...") do |say_id|
- threads.each_with_index do |t, i|
- next unless t.dirty?
- BufferManager.say "Saving thread #{i +1} of #{threads.length}...", say_id
+ dirty_threads.each_with_index do |t, i|
+ BufferManager.say "Saving modified thread #{i + 1} of #{dirty_threads.length}...", say_id
t.save Index
end
end