… | |
… | |
387 | qline->l = llen ? MOD (llen - 1, ncol) + 1 : 0; |
387 | qline->l = llen ? MOD (llen - 1, ncol) + 1 : 0; |
388 | qline->is_longer (0); |
388 | qline->is_longer (0); |
389 | scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE); |
389 | scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE); |
390 | } |
390 | } |
391 | while (p != pend && q > 0); |
391 | while (p != pend && q > 0); |
|
|
392 | |
|
|
393 | // make sure all terminal lines exist |
|
|
394 | while (top_row > 0) |
|
|
395 | scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); |
392 | } |
396 | } |
393 | else |
397 | else |
394 | #endif |
398 | #endif |
395 | { |
399 | { |
396 | // wing, instead of wrap |
400 | // wing, instead of wrap |
… | |
… | |
400 | q--; |
404 | q--; |
401 | |
405 | |
402 | copy_line (row_buf [q], prev_row_buf [p]); |
406 | copy_line (row_buf [q], prev_row_buf [p]); |
403 | } |
407 | } |
404 | while (p != pend); |
408 | while (p != pend); |
|
|
409 | |
|
|
410 | screen.cur.row += nrow - prev_nrow; |
405 | } |
411 | } |
406 | |
412 | |
407 | term_start = total_rows - nrow; |
413 | term_start = total_rows - nrow; |
408 | top_row = q - term_start; |
414 | top_row = q - term_start; |
409 | |
415 | |
410 | // make sure all terminal lines exist |
|
|
411 | while (top_row > 0) |
|
|
412 | scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); |
|
|
413 | |
|
|
414 | clamp_it (screen.cur.row, 0, nrow - 1); |
416 | clamp_it (screen.cur.row, 0, nrow - 1); |
415 | clamp_it (screen.cur.col, 0, ncol - 1); |
417 | clamp_it (screen.cur.col, 0, ncol - 1); |
416 | } |
418 | } |
417 | |
419 | |
|
|
420 | // ensure drawn_buf, swap_buf and terminal rows are all initialized |
418 | for (int row = nrow; row--; ) |
421 | for (int row = nrow; row--; ) |
419 | { |
422 | { |
420 | if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE); |
423 | if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE); |
421 | if (!swap_buf [row].valid ()) scr_blank_screen_mem (swap_buf [row], DEFAULT_RSTYLE); |
424 | if (!swap_buf [row].valid ()) scr_blank_screen_mem (swap_buf [row], DEFAULT_RSTYLE); |
422 | if (!drawn_buf [row].valid ()) scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); |
425 | if (!drawn_buf [row].valid ()) scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); |