… | |
… | |
158 | * ------------------------------------------------------------------------- */ |
158 | * ------------------------------------------------------------------------- */ |
159 | |
159 | |
160 | void |
160 | void |
161 | rxvt_term::scr_reset () |
161 | rxvt_term::scr_reset () |
162 | { |
162 | { |
163 | scr_soft_reset (); |
|
|
164 | |
|
|
165 | view_start = 0; |
163 | view_start = 0; |
166 | num_scr = 0; |
164 | num_scr = 0; |
167 | |
165 | |
168 | if (ncol == 0) |
166 | if (ncol == 0) |
169 | ncol = 80; |
167 | ncol = 80; |
… | |
… | |
280 | |
278 | |
281 | if (top_row) |
279 | if (top_row) |
282 | { |
280 | { |
283 | // Re-wrap lines. This is rather ugly, possibly because I am too dumb |
281 | // Re-wrap lines. This is rather ugly, possibly because I am too dumb |
284 | // to come up with a lean and mean algorithm. |
282 | // to come up with a lean and mean algorithm. |
|
|
283 | // TODO: maybe optimise when width didn't change |
285 | |
284 | |
286 | row_col_t ocur = screen.cur; |
285 | row_col_t ocur = screen.cur; |
287 | ocur.row = MOD (term_start + ocur.row, prev_total_rows); |
286 | ocur.row = MOD (term_start + ocur.row, prev_total_rows); |
288 | |
287 | |
289 | do |
288 | do |
… | |
… | |
436 | void |
435 | void |
437 | rxvt_term::scr_poweron () |
436 | rxvt_term::scr_poweron () |
438 | { |
437 | { |
439 | scr_release (); |
438 | scr_release (); |
440 | prev_nrow = prev_ncol = 0; |
439 | prev_nrow = prev_ncol = 0; |
|
|
440 | rvideo_mode = false; |
|
|
441 | scr_soft_reset (); |
441 | scr_reset (); |
442 | scr_reset (); |
442 | |
443 | |
443 | scr_clear (true); |
444 | scr_clear (true); |
444 | scr_refresh (); |
445 | scr_refresh (); |
445 | } |
446 | } |
… | |
… | |
449 | { |
450 | { |
450 | /* only affects modes, nothing drastic such as clearing the screen */ |
451 | /* only affects modes, nothing drastic such as clearing the screen */ |
451 | #if ENABLE_OVERLAY |
452 | #if ENABLE_OVERLAY |
452 | scr_overlay_off (); |
453 | scr_overlay_off (); |
453 | #endif |
454 | #endif |
454 | |
|
|
455 | rvideo_mode = false; |
|
|
456 | |
455 | |
457 | if (current_screen != PRIMARY) |
456 | if (current_screen != PRIMARY) |
458 | scr_swap_screen (); |
457 | scr_swap_screen (); |
459 | |
458 | |
460 | free (tabs); |
459 | free (tabs); |
… | |
… | |
1541 | { |
1540 | { |
1542 | line->t[col] = line->t[col + count]; |
1541 | line->t[col] = line->t[col + count]; |
1543 | line->r[col] = line->r[col + count]; |
1542 | line->r[col] = line->r[col + count]; |
1544 | } |
1543 | } |
1545 | |
1544 | |
1546 | scr_blank_line (*line, ncol - count, count, |
1545 | scr_blank_line (*line, ncol - count, count, rstyle); |
1547 | line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask)); |
|
|
1548 | |
1546 | |
1549 | if (selection.op && current_screen == selection.screen |
1547 | if (selection.op && current_screen == selection.screen |
1550 | && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur)) |
1548 | && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur)) |
1551 | { |
1549 | { |
1552 | if (selection.end.row != screen.cur.row |
1550 | if (selection.end.row != screen.cur.row |