Code

Tune the view clearing to wait until 2 seconds has passed
authorJonas Fonseca <fonseca@diku.dk>
Sat, 31 Jan 2009 09:06:30 +0000 (10:06 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 2 Feb 2009 08:35:00 +0000 (09:35 +0100)
The code introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428 broke
the smoothness of updates in some cases.

tig.c

diff --git a/tig.c b/tig.c
index c20a9d4f9b833a3f7d2c796ac5b4c3d591b42823..b4e4b596078919afdb620efb922590ab9f0e3620 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2769,7 +2769,7 @@ update_view(struct view *view)
                if (view->lines == 0) {
                        time_t secs = time(NULL) - view->start_time;
 
-                       if (secs > view->update_secs) {
+                       if (secs > 1 && secs > view->update_secs) {
                                if (view->update_secs == 0)
                                        redraw_view(view);
                                update_view_title(view);