aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/st.c b/st.c
index 01791a5..504239e 100644
--- a/st.c
+++ b/st.c
@@ -166,6 +166,8 @@ static int32_t tdefcolor(int *, int *, int);
static void tdeftran(char);
static void tstrsequence(uchar);
+static void drawregion(int, int, int, int);
+
static void selscroll(int, int);
static void selsnap(int *, int *, int);
@@ -2527,6 +2529,29 @@ resettitle(void)
}
void
+drawregion(int x1, int y1, int x2, int y2)
+{
+ int y;
+ for (y = y1; y < y2; y++) {
+ if (!term.dirty[y])
+ continue;
+
+ term.dirty[y] = 0;
+ xdrawline(term.line[y], x1, y, x2);
+ }
+}
+
+void
+draw(void)
+{
+ if (!xstartdraw())
+ return;
+ drawregion(0, 0, term.col, term.row);
+ xdrawcursor();
+ xfinishdraw();
+}
+
+void
redraw(void)
{
tfulldirt();
remember that computers suck.