commit e0d991260fb7f591e29d4c2dfdfe230deeed2640
parent 9e4eb04ee5ffc7247ddee4377872f85cf2755469
Author: Israel Herraiz <israel.herraiz@gmail.com>
Date: Sun, 17 Jan 2010 13:36:16 +0100
make '$' call Index.save
Although saving is magically instantaneous now, it's still useful to force
Xapian to flush on command. This repurposes the old '$', which used to manually
save the index, to do this.
(commit message: wmorgan)
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -37,6 +37,7 @@ EOS
k.add :toggle_spam, "Mark/unmark thread as spam", 'S'
k.add :toggle_deleted, "Delete/undelete thread", 'd'
k.add :kill, "Kill thread (never to be seen in inbox again)", '&'
+ k.add :flush_index, "Flush all changes now", '$'
k.add :jump_to_next_new, "Jump to next new thread", :tab
k.add :reply, "Reply to latest message in a thread", 'r'
k.add :reply_all, "Reply to all participants of the latest message in a thread", 'G'
@@ -452,6 +453,12 @@ EOS
multi_kill [t]
end
+ def flush_index
+ @flush_id = BufferManager.say "Flushing index..."
+ Index.save_index
+ BufferManager.clear @flush_id
+ end
+
## m-m-m-m-MULTI-KILL
def multi_kill threads
UndoManager.register "killing #{threads.size.pluralize 'thread'}" do