summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddc5064)
raw | patch | inline | side by side (parent: ddc5064)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 15 Jan 2009 14:56:11 +0000 (15:56 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 15 Jan 2009 15:04:09 +0000 (16:04 +0100) |
NEWS | patch | blob | history | |
tig.c | patch | blob | history |
index 4f41bd2ac00344c3da4b14a4c17a74a060119deb..2ac62caba5b82f9d6637ec2aab24d0b00f4bf714 100644 (file)
--- a/NEWS
+++ b/NEWS
tig master
----------
+Improvements:
+
+ - Tree view: avoid flickering when updating.
+
Bug fixes:
- Tree view: fix memory corruption bug when updating.
index 68d33acfd75f7484478a366a816b4750267dcd0a..c1412883998d66df15ff7356443e6bdb0bb9d2c4 100644 (file)
--- a/tig.c
+++ b/tig.c
/* State flags */
unsigned int selected:1;
unsigned int dirty:1;
+ unsigned int cleareol:1;
void *data; /* User data */
};
line = &view->line[view->offset + lineno];
wmove(view->win, lineno, 0);
+ if (line->cleareol)
+ wclrtoeol(view->win);
view->col = 0;
view->curline = line;
view->curtype = LINE_NONE;
line->selected = FALSE;
- line->dirty = 0;
+ line->dirty = line->cleareol = 0;
if (selected) {
set_view_attr(view, LINE_CURSOR);
line->selected = TRUE;
view->ops->select(view, line);
- } else if (line->selected) {
- wclrtoeol(view->win);
}
scrollok(view->win, FALSE);
char *line;
/* Clear the view and redraw everything since the tree sorting
* might have rearranged things. */
- bool redraw = view == VIEW(REQ_VIEW_TREE);
+ bool redraw = FALSE;
bool can_read = TRUE;
if (!view->pipe)
line->data = text;
line->type = type;
+ for (; line <= entry; line++)
+ line->dirty = line->cleareol = 1;
return TRUE;
}