… | |
… | |
332 | llen += prev_ncol; |
332 | llen += prev_ncol; |
333 | } |
333 | } |
334 | |
334 | |
335 | int qlines = max (0, (llen - 1) / ncol) + 1; |
335 | int qlines = max (0, (llen - 1) / ncol) + 1; |
336 | |
336 | |
|
|
337 | // drop partial lines completely |
|
|
338 | if (q < qlines) |
|
|
339 | break; |
|
|
340 | |
337 | q -= qlines; |
341 | q -= qlines; |
338 | |
|
|
339 | // drop partial lines completely |
|
|
340 | if (q < 0) |
|
|
341 | break; |
|
|
342 | |
342 | |
343 | int lofs = 0; |
343 | int lofs = 0; |
344 | line_t *qline; |
344 | line_t *qline; |
345 | |
345 | |
346 | // re-assemble the full line by destination lines |
346 | // re-assemble the full line by destination lines |
… | |
… | |
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); |
|
|
396 | } |
392 | } |
397 | else |
393 | else |
398 | #endif |
394 | #endif |
399 | { |
395 | { |
400 | // wing, instead of wrap |
396 | // wing, instead of wrap |
|
|
397 | screen.cur.row += nrow - prev_nrow; |
|
|
398 | |
401 | do |
399 | do |
402 | { |
400 | { |
403 | p = MOD (p - 1, prev_total_rows); |
401 | p = MOD (p - 1, prev_total_rows); |
404 | q--; |
402 | q--; |
405 | |
403 | |
406 | copy_line (row_buf [q], prev_row_buf [p]); |
404 | copy_line (row_buf [q], prev_row_buf [p]); |
407 | } |
405 | } |
408 | while (p != pend); |
406 | while (p != pend && q > 0); |
409 | |
|
|
410 | screen.cur.row += nrow - prev_nrow; |
|
|
411 | } |
407 | } |
412 | |
408 | |
413 | term_start = total_rows - nrow; |
409 | term_start = total_rows - nrow; |
414 | top_row = q - term_start; |
410 | top_row = q - term_start; |
|
|
411 | |
|
|
412 | // make sure all terminal lines exist |
|
|
413 | while (top_row > 0) |
|
|
414 | scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); |
415 | |
415 | |
416 | clamp_it (screen.cur.row, 0, nrow - 1); |
416 | clamp_it (screen.cur.row, 0, nrow - 1); |
417 | clamp_it (screen.cur.col, 0, ncol - 1); |
417 | clamp_it (screen.cur.col, 0, ncol - 1); |
418 | } |
418 | } |
419 | |
419 | |