From 81030ec8e1d89c873a102558730ff7306a8ae12e Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 17 May 2006 23:43:22 +0200 Subject: [PATCH] Group display functions at the bottom --- tig.c | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/tig.c b/tig.c index a0f7911..c50bbf0 100644 --- 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) { -- 2.30.2