summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2014-07-22 16:43:23 -0400
committerQuentin Carbonneaux2014-07-22 16:43:23 -0400
commitfe7c7145f0e8653f8e8e7e454b47b2e47aba9515 (patch)
treeece9ee0acebad30d7c68332505d73a8b27957930
parentfdf85ec4ac7881daca1b4072431204a93c38eb1d (diff)
fix tag display bug related to w->rev
The revision of the tag needs to be updated when drawn. I moved the revision bumping code in draw() to handle both the tag and regular windows uniformly. It is unclear if this use of rev == 0 is sane or not. Indeed, the dirty(W *) code will update the window only if rev != 0, this implies that the following invariant holds: ! Whenever rev == 0, the l[] array is ! ! up-to-date with the buffer. ! I do not know if this is true now.
-rw-r--r--win.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win.c b/win.c
index fb62b20..90b0063 100644
--- a/win.c
+++ b/win.c
@@ -132,7 +132,6 @@ win_redraw_frame()
for (w=wins; w-wins<MaxWins; w++)
if (w->eb && dirty(w)) {
draw(w, GPaleYellow);
- w->rev = eb_revision(w->eb);
if (tag.owner == w)
tag.win.rev = 0;
}
@@ -399,6 +398,7 @@ draw(W *w, GColor bg)
flushfrag(&f, w, 0, 0, sel);
if (cw != 0)
g->drawrect(&w->gr, cx, cy, cw, font.height, GXBlack);
+ w->rev = eb_revision(w->eb);
}
/* move - Resize and recompute appearance