sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 29a62238e79ef9a70bba73cc5e04031dadc2d5f9
parent 3a24e46de0b484aaf16914f3b2a3ff61a644073f
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Wed, 30 Sep 2009 15:55:39 -0400

minor tweak: don't call load-more callback more than twice a second

Otherwise the while program starts thrashing if you downarrow very quickly.

Diffstat:
M lib/sup/modes/line-cursor-mode.rb | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
@@ -20,6 +20,8 @@ class LineCursorMode < ScrollMode
       while true
         e = @load_more_q.pop
         @load_more_callbacks.each { |c| c.call e }
+        sleep 0.5
+        @load_more_q.pop until @load_more_q.empty?
       end
     end