diff options
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -166,6 +166,8 @@ static int32_t tdefcolor(int *, int *, int); | |||
166 | static void tdeftran(char); | 166 | static void tdeftran(char); |
167 | static void tstrsequence(uchar); | 167 | static void tstrsequence(uchar); |
168 | 168 | ||
169 | static void drawregion(int, int, int, int); | ||
170 | |||
169 | static void selscroll(int, int); | 171 | static void selscroll(int, int); |
170 | static void selsnap(int *, int *, int); | 172 | static void selsnap(int *, int *, int); |
171 | 173 | ||
@@ -2527,6 +2529,29 @@ resettitle(void) | |||
2527 | } | 2529 | } |
2528 | 2530 | ||
2529 | void | 2531 | void |
2532 | drawregion(int x1, int y1, int x2, int y2) | ||
2533 | { | ||
2534 | int y; | ||
2535 | for (y = y1; y < y2; y++) { | ||
2536 | if (!term.dirty[y]) | ||
2537 | continue; | ||
2538 | |||
2539 | term.dirty[y] = 0; | ||
2540 | xdrawline(term.line[y], x1, y, x2); | ||
2541 | } | ||
2542 | } | ||
2543 | |||
2544 | void | ||
2545 | draw(void) | ||
2546 | { | ||
2547 | if (!xstartdraw()) | ||
2548 | return; | ||
2549 | drawregion(0, 0, term.col, term.row); | ||
2550 | xdrawcursor(); | ||
2551 | xfinishdraw(); | ||
2552 | } | ||
2553 | |||
2554 | void | ||
2530 | redraw(void) | 2555 | redraw(void) |
2531 | { | 2556 | { |
2532 | tfulldirt(); | 2557 | tfulldirt(); |