summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aef019e)
raw | patch | inline | side by side (parent: aef019e)
author | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 19 Jan 2009 14:50:00 +0000 (15:50 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 21 Jan 2009 22:15:17 +0000 (23:15 +0100) |
Use werase instead of wclear in redraw_view and optionally make
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.
tig.c | patch | blob | history |
index a8976b98d864ab25dc9014d99ff8bae5b10ca0d6..74f78df589921a65ae038903944c2f4c0be5029e 100644 (file)
--- a/tig.c
+++ b/tig.c
static void
redraw_view(struct view *view)
{
- wclear(view->win);
+ werase(view->win);
redraw_view_from(view, 0);
}
}
static void
-redraw_display(void)
+redraw_display(bool clear)
{
struct view *view;
int i;
foreach_displayed_view (view, i) {
+ if (clear)
+ wclear(view->win);
redraw_view(view);
update_view_title(view);
}
toggle_view_option(bool *option, const char *help)
{
*option = !*option;
- redraw_display();
+ redraw_display(FALSE);
report("%sabling %s", *option ? "En" : "Dis", help);
}
fprintf(stderr, "Press Enter to continue");
getc(opt_tty);
reset_prog_mode();
- redraw_display();
+ redraw_display(TRUE);
}
static void
resize_display();
/* Fall-through */
case REQ_SCREEN_REDRAW:
- redraw_display();
+ redraw_display(TRUE);
break;
case REQ_EDIT:
display[current_view] = view->parent;
view->parent = view;
resize_display();
- redraw_display();
+ redraw_display(FALSE);
report("");
break;
}