… | |
… | |
455 | scr_clear (true); |
455 | scr_clear (true); |
456 | scr_refresh (); |
456 | scr_refresh (); |
457 | } |
457 | } |
458 | |
458 | |
459 | void |
459 | void |
460 | rxvt_term::scr_soft_reset () |
460 | rxvt_term::scr_soft_reset () NOTHROW |
461 | { |
461 | { |
462 | /* only affects modes, nothing drastic such as clearing the screen */ |
462 | /* only affects modes, nothing drastic such as clearing the screen */ |
463 | #if ENABLE_OVERLAY |
463 | #if ENABLE_OVERLAY |
464 | scr_overlay_off (); |
464 | scr_overlay_off (); |
465 | #endif |
465 | #endif |
… | |
… | |
520 | assert (s->cur.row >= 0); |
520 | assert (s->cur.row >= 0); |
521 | assert (s->cur.col >= 0); |
521 | assert (s->cur.col >= 0); |
522 | } |
522 | } |
523 | |
523 | |
524 | void |
524 | void |
525 | rxvt_term::scr_swap_screen () |
525 | rxvt_term::scr_swap_screen () NOTHROW |
526 | { |
526 | { |
527 | if (!option (Opt_secondaryScreen)) |
527 | if (!option (Opt_secondaryScreen)) |
528 | return; |
528 | return; |
529 | |
529 | |
530 | for (int i = prev_nrow; i--; ) |
530 | for (int i = prev_nrow; i--; ) |
… | |
… | |
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 | |
… | |
… | |
2482 | |
2481 | |
2483 | XDrawRectangle (dpy, vt, gc, |
2482 | XDrawRectangle (dpy, vt, gc, |
2484 | Col2Pixel (col), |
2483 | Col2Pixel (col), |
2485 | Row2Pixel (oldcursor.row), |
2484 | Row2Pixel (oldcursor.row), |
2486 | (unsigned int) (Width2Pixel (cursorwidth) - 1), |
2485 | (unsigned int) (Width2Pixel (cursorwidth) - 1), |
2487 | (unsigned int) (Height2Pixel (1) - lineSpace - 1)); |
2486 | (unsigned int) (Height2Pixel (1) - 1)); |
2488 | } |
2487 | } |
2489 | } |
2488 | } |
2490 | |
2489 | |
2491 | /* |
2490 | /* |
2492 | * H: cleanup selection |
2491 | * H: cleanup selection |
… | |
… | |
2705 | for (unsigned int i = 0; i < len; i++) |
2704 | for (unsigned int i = 0; i < len; i++) |
2706 | if (data[i] == C0_LF) |
2705 | if (data[i] == C0_LF) |
2707 | data[i] = C0_CR; |
2706 | data[i] = C0_CR; |
2708 | |
2707 | |
2709 | if (priv_modes & PrivMode_BracketPaste) |
2708 | if (priv_modes & PrivMode_BracketPaste) |
2710 | tt_printf ("\e[200~"); |
2709 | tt_printf ("\x1b[200~"); |
2711 | |
2710 | |
2712 | tt_write (data, len); |
2711 | tt_write (data, len); |
2713 | |
2712 | |
2714 | if (priv_modes & PrivMode_BracketPaste) |
2713 | if (priv_modes & PrivMode_BracketPaste) |
2715 | tt_printf ("\e[201~"); |
2714 | tt_printf ("\x1b[201~"); |
2716 | } |
2715 | } |
2717 | |
2716 | |
2718 | void |
2717 | void |
2719 | rxvt_term::paste (char *data, unsigned int len) NOTHROW |
2718 | rxvt_term::paste (char *data, unsigned int len) NOTHROW |
2720 | { |
2719 | { |