Document the loading time displayed in the title window after 3 seconds
[tig] / tig.c
diff --git a/tig.c b/tig.c
index 308106b..055ad11 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -820,6 +820,10 @@ redraw_view(struct view *view)
  *     [main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%)
  *
  * By default, the title of the current view is highlighted using bold font.
+ * For long loading views (taking over 3 seconds) the time since loading
+ * started will be appended:
+ *
+ *     [main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s
  **/
 
 static void
@@ -1472,7 +1476,8 @@ view_driver(struct view *view, enum request request)
                break;
 
        case REQ_STOP_LOADING:
-               foreach_view (view, i) {
+               for (i = 0; i < ARRAY_SIZE(views); i++) {
+                       view = &views[i];
                        if (view->pipe)
                                report("Stopped loading the %s view", view->name),
                        end_update(view);