… | |
… | |
1312 | scr_blank_line (line, col, num, rstyle); |
1312 | scr_blank_line (line, col, num, rstyle); |
1313 | } |
1313 | } |
1314 | |
1314 | |
1315 | /* ------------------------------------------------------------------------- */ |
1315 | /* ------------------------------------------------------------------------- */ |
1316 | /* |
1316 | /* |
1317 | * Erase part of whole of the screen |
1317 | * Erase part or whole of the screen |
1318 | * XTERM_SEQ: Clear screen after cursor : ESC [ 0 J |
1318 | * XTERM_SEQ: Clear screen after cursor : ESC [ 0 J |
1319 | * XTERM_SEQ: Clear screen before cursor: ESC [ 1 J |
1319 | * XTERM_SEQ: Clear screen before cursor: ESC [ 1 J |
1320 | * XTERM_SEQ: Clear whole screen : ESC [ 2 J |
1320 | * XTERM_SEQ: Clear whole screen : ESC [ 2 J |
1321 | */ |
1321 | */ |
1322 | void |
1322 | void |
… | |
… | |
1367 | { |
1367 | { |
1368 | ren = DEFAULT_RSTYLE; |
1368 | ren = DEFAULT_RSTYLE; |
1369 | |
1369 | |
1370 | if (mapped) |
1370 | if (mapped) |
1371 | XClearArea (dpy, vt, 0, |
1371 | XClearArea (dpy, vt, 0, |
1372 | Row2Pixel (row - view_start), (unsigned int)width, |
1372 | Row2Pixel (row - view_start), (unsigned int)vt_width, |
1373 | (unsigned int)Height2Pixel (num), False); |
1373 | (unsigned int)Height2Pixel (num), False); |
1374 | } |
1374 | } |
1375 | else |
1375 | else |
1376 | { |
1376 | { |
1377 | ren = rstyle & (RS_fgMask | RS_bgMask); |
1377 | ren = rstyle & (RS_fgMask | RS_bgMask); |
… | |
… | |
1380 | { |
1380 | { |
1381 | gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; |
1381 | gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; |
1382 | XChangeGC (dpy, gc, GCForeground, &gcvalue); |
1382 | XChangeGC (dpy, gc, GCForeground, &gcvalue); |
1383 | XFillRectangle (dpy, vt, gc, |
1383 | XFillRectangle (dpy, vt, gc, |
1384 | 0, Row2Pixel (row - view_start), |
1384 | 0, Row2Pixel (row - view_start), |
1385 | (unsigned int)width, |
1385 | (unsigned int)vt_width, |
1386 | (unsigned int)Height2Pixel (num)); |
1386 | (unsigned int)Height2Pixel (num)); |
1387 | gcvalue.foreground = pix_colors[Color_fg]; |
1387 | gcvalue.foreground = pix_colors[Color_fg]; |
1388 | XChangeGC (dpy, gc, GCForeground, &gcvalue); |
1388 | XChangeGC (dpy, gc, GCForeground, &gcvalue); |
1389 | } |
1389 | } |
1390 | } |
1390 | } |
… | |
… | |
1876 | * Refresh the entire screen |
1876 | * Refresh the entire screen |
1877 | */ |
1877 | */ |
1878 | void |
1878 | void |
1879 | rxvt_term::scr_touch (bool refresh) NOTHROW |
1879 | rxvt_term::scr_touch (bool refresh) NOTHROW |
1880 | { |
1880 | { |
1881 | scr_expose (0, 0, width, height, refresh); |
1881 | scr_expose (0, 0, vt_width, vt_height, refresh); |
1882 | } |
1882 | } |
1883 | |
1883 | |
1884 | /* ------------------------------------------------------------------------- */ |
1884 | /* ------------------------------------------------------------------------- */ |
1885 | /* |
1885 | /* |
1886 | * Move the display so that the line represented by scrollbar value Y is at |
1886 | * Move the display so that the line represented by scrollbar value Y is at |
… | |
… | |
2167 | { |
2167 | { |
2168 | int16_t nits; |
2168 | int16_t nits; |
2169 | int i = num_scr; |
2169 | int i = num_scr; |
2170 | int j; |
2170 | int j; |
2171 | int len, wlen; |
2171 | int len, wlen; |
2172 | dLocal (int, num_scr); |
|
|
2173 | |
2172 | |
2174 | j = nrow; |
2173 | j = nrow; |
2175 | wlen = len = -1; |
2174 | wlen = len = -1; |
2176 | row = i > 0 ? 0 : j - 1; |
2175 | row = i > 0 ? 0 : j - 1; |
2177 | |
2176 | |
… | |
… | |
2668 | */ |
2667 | */ |
2669 | #if 0 |
2668 | #if 0 |
2670 | void |
2669 | void |
2671 | rxvt_term::scr_dump (int fd) NOTHROW |
2670 | rxvt_term::scr_dump (int fd) NOTHROW |
2672 | { |
2671 | { |
2673 | int row, wrote; |
2672 | // if this method is needed, it can be implemented by factoring the |
2674 | unsigned int width, towrite; |
2673 | // relevant code in scr_printscreen |
2675 | const char r1[] = "\n"; |
|
|
2676 | |
|
|
2677 | for (row = saveLines + top_row; |
|
|
2678 | row < saveLines + nrow - 1; row++) |
|
|
2679 | { |
|
|
2680 | width = row_buf[row].l >= 0 ? row_buf[row].l |
|
|
2681 | : ncol; |
|
|
2682 | for (towrite = width; towrite; towrite -= wrote) |
|
|
2683 | { |
|
|
2684 | wrote = write (fd, & (row_buf[row].t[width - towrite]), |
|
|
2685 | towrite); |
|
|
2686 | if (wrote < 0) |
|
|
2687 | return; /* XXX: death, no report */ |
|
|
2688 | } |
|
|
2689 | if (row_buf[row].l >= 0) |
|
|
2690 | if (write (fd, r1, 1) <= 0) |
|
|
2691 | return; /* XXX: death, no report */ |
|
|
2692 | } |
|
|
2693 | } |
2674 | } |
2694 | #endif |
2675 | #endif |
2695 | |
2676 | |
2696 | /* ------------------------------------------------------------------------- * |
2677 | /* ------------------------------------------------------------------------- * |
2697 | * CHARACTER SELECTION * |
2678 | * CHARACTER SELECTION * |