… | |
… | |
286 | ocur.row = MOD (term_start + ocur.row, prev_total_rows); |
286 | ocur.row = MOD (term_start + ocur.row, prev_total_rows); |
287 | |
287 | |
288 | do |
288 | do |
289 | { |
289 | { |
290 | p = MOD (p - 1, prev_total_rows); |
290 | p = MOD (p - 1, prev_total_rows); |
291 | #ifdef DEBUG_STRICT |
|
|
292 | assert (old_buf [MOD (p, prev_total_rows)].t); |
291 | assert (old_buf [MOD (p, prev_total_rows)].t); |
293 | #endif |
|
|
294 | int plines = 1; |
292 | int plines = 1; |
295 | int llen = old_buf [MOD (p, prev_total_rows)].l; |
293 | int llen = old_buf [MOD (p, prev_total_rows)].l; |
296 | |
294 | |
297 | while (p != pend && old_buf [MOD (p - 1, prev_total_rows)].is_longer ()) |
295 | while (p != pend && old_buf [MOD (p - 1, prev_total_rows)].is_longer ()) |
298 | { |
296 | { |
… | |
… | |
510 | } |
508 | } |
511 | |
509 | |
512 | /* boundary check in case screen size changed between SAVE and RESTORE */ |
510 | /* boundary check in case screen size changed between SAVE and RESTORE */ |
513 | min_it (s->cur.row, nrow - 1); |
511 | min_it (s->cur.row, nrow - 1); |
514 | min_it (s->cur.col, ncol - 1); |
512 | min_it (s->cur.col, ncol - 1); |
515 | #ifdef DEBUG_STRICT |
|
|
516 | assert (s->cur.row >= 0); |
513 | assert (s->cur.row >= 0); |
517 | assert (s->cur.col >= 0); |
514 | assert (s->cur.col >= 0); |
518 | #endif |
|
|
519 | } |
515 | } |
520 | |
516 | |
521 | void |
517 | void |
522 | rxvt_term::scr_swap_screen () |
518 | rxvt_term::scr_swap_screen () |
523 | { |
519 | { |
… | |
… | |
783 | scr_scroll_text (screen.tscroll, screen.bscroll, minlines); |
779 | scr_scroll_text (screen.tscroll, screen.bscroll, minlines); |
784 | screen.cur.row -= minlines; |
780 | screen.cur.row -= minlines; |
785 | } |
781 | } |
786 | } |
782 | } |
787 | |
783 | |
788 | #ifdef DEBUG_STRICT |
|
|
789 | assert (screen.cur.col < ncol); |
784 | assert (screen.cur.col < ncol); |
790 | assert (screen.cur.row < nrow |
785 | assert (screen.cur.row < nrow |
791 | && screen.cur.row >= top_row); |
786 | && screen.cur.row >= top_row); |
792 | #endif |
|
|
793 | int row = screen.cur.row; |
787 | int row = screen.cur.row; |
794 | |
788 | |
795 | checksel = selection.op && current_screen == selection.screen ? 1 : 0; |
789 | checksel = selection.op && current_screen == selection.screen ? 1 : 0; |
796 | |
790 | |
797 | line_t *line = &ROW(row); |
791 | line_t *line = &ROW(row); |
… | |
… | |
1001 | #endif |
995 | #endif |
1002 | } |
996 | } |
1003 | |
997 | |
1004 | max_it (line->l, screen.cur.col); |
998 | max_it (line->l, screen.cur.col); |
1005 | |
999 | |
1006 | #ifdef DEBUG_STRICT |
|
|
1007 | assert (screen.cur.row >= 0); |
1000 | assert (screen.cur.row >= 0); |
1008 | #endif |
|
|
1009 | } |
1001 | } |
1010 | |
1002 | |
1011 | /* ------------------------------------------------------------------------- */ |
1003 | /* ------------------------------------------------------------------------- */ |
1012 | /* |
1004 | /* |
1013 | * Process Backspace. Move back the cursor back a position, wrap if have to |
1005 | * Process Backspace. Move back the cursor back a position, wrap if have to |
… | |
… | |
2250 | for (i = 0; ++col < ncol; ) |
2242 | for (i = 0; ++col < ncol; ) |
2251 | { |
2243 | { |
2252 | if (stp[col] == NOCHAR) |
2244 | if (stp[col] == NOCHAR) |
2253 | { |
2245 | { |
2254 | dtp[col] = stp[col]; |
2246 | dtp[col] = stp[col]; |
2255 | drp[col] = rend; |
2247 | drp[col] = srp[col]; |
|
|
2248 | |
2256 | count++; |
2249 | count++; |
2257 | i++; |
2250 | i++; |
2258 | |
2251 | |
2259 | continue; |
2252 | continue; |
2260 | } |
2253 | } |