Code

Group display functions at the bottom
authorJonas Fonseca <fonseca@diku.dk>
Wed, 17 May 2006 21:43:22 +0000 (23:43 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Wed, 17 May 2006 21:43:22 +0000 (23:43 +0200)
tig.c

diff --git a/tig.c b/tig.c
index a0f79113736676ca9ee2cffb608e91d6cffa4701..c50bbf09d3bde6d45f0eaebdce7051a0be41c9bf 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -714,6 +714,35 @@ redraw_view(struct view *view)
        redraw_view_from(view, 0);
 }
 
+static void
+update_view_title(struct view *view)
+{
+       if (view == display[current_view])
+               wbkgdset(view->title, get_line_attr(LINE_TITLE_FOCUS));
+       else
+               wbkgdset(view->title, get_line_attr(LINE_TITLE_BLUR));
+
+       werase(view->title);
+       wmove(view->title, 0, 0);
+
+       /* [main] ref: 334b506... - commit 6 of 4383 (0%) */
+
+       if (*view->ref)
+               wprintw(view->title, "[%s] %s", view->name, view->ref);
+       else
+               wprintw(view->title, "[%s]", view->name);
+
+       if (view->lines) {
+               wprintw(view->title, " - %s %d of %d (%d%%)",
+                       view->ops->type,
+                       view->lineno + 1,
+                       view->lines,
+                       (view->lineno + 1) * 100 / view->lines);
+       }
+
+       wrefresh(view->title);
+}
+
 static void
 resize_display(void)
 {
@@ -769,35 +798,6 @@ resize_display(void)
        }
 }
 
-static void
-update_view_title(struct view *view)
-{
-       if (view == display[current_view])
-               wbkgdset(view->title, get_line_attr(LINE_TITLE_FOCUS));
-       else
-               wbkgdset(view->title, get_line_attr(LINE_TITLE_BLUR));
-
-       werase(view->title);
-       wmove(view->title, 0, 0);
-
-       /* [main] ref: 334b506... - commit 6 of 4383 (0%) */
-
-       if (*view->ref)
-               wprintw(view->title, "[%s] %s", view->name, view->ref);
-       else
-               wprintw(view->title, "[%s]", view->name);
-
-       if (view->lines) {
-               wprintw(view->title, " - %s %d of %d (%d%%)",
-                       view->ops->type,
-                       view->lineno + 1,
-                       view->lines,
-                       (view->lineno + 1) * 100 / view->lines);
-       }
-
-       wrefresh(view->title);
-}
-
 static void
 redraw_display(void)
 {