summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2014-08-11 10:57:36 -0400
committerQuentin Carbonneaux2014-08-11 10:57:36 -0400
commit2e4047d0ce3beccde0a1756ad861744b8e764944 (patch)
tree93f646af684bddba7e3066be3a5bd9092ba0142c
parent7669a65209ef6d5b631ebaf7b710a1022678f657 (diff)
signal the user when the buffer is dirty
-rw-r--r--gui.h1
-rw-r--r--win.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/gui.h b/gui.h
index 4380bf4..552ea7e 100644
--- a/gui.h
+++ b/gui.h
@@ -17,6 +17,7 @@ struct gcolor {
};
#define GBlack (GColor){ 0, 0, 0, 0 }
+#define GGray (GColor){ 150, 150, 150, 0 }
#define GPaleBlue (GColor){ 208, 235, 255, 0 }
#define GPaleGreen (GColor){ 231, 255, 221, 0 }
#define GPalePink (GColor){ 255, 248, 221, 0 }
diff --git a/win.c b/win.c
index 5cc8c48..d2fea91 100644
--- a/win.c
+++ b/win.c
@@ -400,6 +400,9 @@ draw(W *w, GColor bg)
flushfrag(&f, w, 0, 0, sel);
if (cw != 0)
g->drawrect(&w->gr, cx, cy, cw, font.height, GXBlack);
+ if (w != &tag.win && w->eb->path)
+ if (w->eb->frev != eb_revision(w->eb))
+ g->drawrect(&w->gr, 2, VMargin, HMargin-4, HMargin-4, GGray);
w->rev = eb_revision(w->eb);
}