diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -2571,6 +2571,7 @@ void | |||
| 2571 | drawregion(int x1, int y1, int x2, int y2) | 2571 | drawregion(int x1, int y1, int x2, int y2) |
| 2572 | { | 2572 | { |
| 2573 | int y; | 2573 | int y; |
| 2574 | |||
| 2574 | for (y = y1; y < y2; y++) { | 2575 | for (y = y1; y < y2; y++) { |
| 2575 | if (!term.dirty[y]) | 2576 | if (!term.dirty[y]) |
| 2576 | continue; | 2577 | continue; |
| @@ -2583,7 +2584,7 @@ drawregion(int x1, int y1, int x2, int y2) | |||
| 2583 | void | 2584 | void |
| 2584 | draw(void) | 2585 | draw(void) |
| 2585 | { | 2586 | { |
| 2586 | int cx = term.c.x; | 2587 | int cx = term.c.x, ocx = term.ocx, ocy = term.ocy; |
| 2587 | 2588 | ||
| 2588 | if (!xstartdraw()) | 2589 | if (!xstartdraw()) |
| 2589 | return; | 2590 | return; |
| @@ -2599,9 +2600,11 @@ draw(void) | |||
| 2599 | drawregion(0, 0, term.col, term.row); | 2600 | drawregion(0, 0, term.col, term.row); |
| 2600 | xdrawcursor(cx, term.c.y, term.line[term.c.y][cx], | 2601 | xdrawcursor(cx, term.c.y, term.line[term.c.y][cx], |
| 2601 | term.ocx, term.ocy, term.line[term.ocy][term.ocx]); | 2602 | term.ocx, term.ocy, term.line[term.ocy][term.ocx]); |
| 2602 | term.ocx = cx, term.ocy = term.c.y; | 2603 | term.ocx = cx; |
| 2604 | term.ocy = term.c.y; | ||
| 2603 | xfinishdraw(); | 2605 | xfinishdraw(); |
| 2604 | xximspot(term.ocx, term.ocy); | 2606 | if (ocx != term.ocx || ocy != term.ocy) |
| 2607 | xximspot(term.ocx, term.ocy); | ||
| 2605 | } | 2608 | } |
| 2606 | 2609 | ||
| 2607 | void | 2610 | void |
