aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/st.c b/st.c
index aa72a43..d47bebc 100644
--- a/st.c
+++ b/st.c
@@ -2248,7 +2248,7 @@ xtermclear(int col1, int row1, int col2, int row2) {
2248void 2248void
2249xclear(int x1, int y1, int x2, int y2) { 2249xclear(int x1, int y1, int x2, int y2) {
2250 XftDrawRect(xw.draw, 2250 XftDrawRect(xw.draw,
2251 &dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg], 2251 &dc.col[IS_SET(MODE_REVERSE)? defaultfg : defaultbg],
2252 x1, y1, x2-x1, y2-y1); 2252 x1, y1, x2-x1, y2-y1);
2253} 2253}
2254 2254
@@ -2515,8 +2515,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
2515 } 2515 }
2516 } 2516 }
2517 2517
2518 if(base.mode & ATTR_REVERSE) 2518 if(base.mode & ATTR_REVERSE) {
2519 temp = fg, fg = bg, bg = temp; 2519 temp = fg;
2520 fg = bg;
2521 bg = temp;
2522 }
2520 2523
2521 XftTextExtentsUtf8(xw.dpy, font->set, (FcChar8 *)s, bytelen, 2524 XftTextExtentsUtf8(xw.dpy, font->set, (FcChar8 *)s, bytelen,
2522 &extents); 2525 &extents);
@@ -2525,11 +2528,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
2525 /* Intelligent cleaning up of the borders. */ 2528 /* Intelligent cleaning up of the borders. */
2526 if(x == 0) { 2529 if(x == 0) {
2527 xclear(0, (y == 0)? 0 : winy, borderpx, 2530 xclear(0, (y == 0)? 0 : winy, borderpx,
2528 winy + xw.ch + ((y == term.row-1)? xw.h : 0)); 2531 winy + xw.ch + ((y >= term.row-1)? xw.h : 0));
2529 } 2532 }
2530 if(x + charlen >= term.col-1) { 2533 if(x + charlen >= term.col)
2531 xclear(winx + width, (y == 0)? 0 : winy, xw.w, 2534 xclear(winx + width, (y == 0)? 0 : winy, xw.w,
2532 ((y == term.row-1)? xw.h : (winy + xw.ch))); 2535 ((y >= term.row-1)? xw.h : (winy + xw.ch)));
2533 } 2536 }
2534 if(y == 0) 2537 if(y == 0)
2535 xclear(winx, 0, winx + width, borderpx); 2538 xclear(winx, 0, winx + width, borderpx);