… | |
… | |
294 | ralloc->free (drawn_rend[p]); |
294 | ralloc->free (drawn_rend[p]); |
295 | } |
295 | } |
296 | |
296 | |
297 | /* we have fewer rows so fix up cursor position */ |
297 | /* we have fewer rows so fix up cursor position */ |
298 | MIN_IT (screen.cur.row, (int32_t)nrow - 1); |
298 | MIN_IT (screen.cur.row, (int32_t)nrow - 1); |
299 | MIN_IT (swap.cur.row, (int32_t)nrow - 1); |
|
|
300 | |
299 | |
301 | scr_reset_realloc (); /* realloc _last_ */ |
300 | scr_reset_realloc (); /* realloc _last_ */ |
302 | } |
301 | } |
303 | else if (nrow > prev_nrow) |
302 | else if (nrow > prev_nrow) |
304 | { |
303 | { |
… | |
… | |
337 | screen.s_cur.row += k; |
336 | screen.s_cur.row += k; |
338 | TermWin.nscrolled -= k; |
337 | TermWin.nscrolled -= k; |
339 | } |
338 | } |
340 | #ifdef DEBUG_STRICT |
339 | #ifdef DEBUG_STRICT |
341 | assert (screen.cur.row < TermWin.nrow); |
340 | assert (screen.cur.row < TermWin.nrow); |
342 | assert (swap.cur.row < TermWin.nrow); |
|
|
343 | #else /* drive with your eyes closed */ |
341 | #else /* drive with your eyes closed */ |
344 | |
342 | |
345 | MIN_IT (screen.cur.row, nrow - 1); |
343 | MIN_IT (screen.cur.row, nrow - 1); |
346 | MIN_IT (swap.cur.row, nrow - 1); |
|
|
347 | #endif |
344 | #endif |
348 | TermWin.ncol = ncol; // save b/c scr_blank_screen_mem uses this |
345 | TermWin.ncol = ncol; // save b/c scr_blank_screen_mem uses this |
349 | } |
346 | } |
350 | |
347 | |
351 | /* resize columns */ |
348 | /* resize columns */ |
… | |
… | |
394 | } |
391 | } |
395 | |
392 | |
396 | } |
393 | } |
397 | |
394 | |
398 | MIN_IT (screen.cur.col, (int16_t)ncol - 1); |
395 | MIN_IT (screen.cur.col, (int16_t)ncol - 1); |
399 | MIN_IT (swap.cur.col, (int16_t)ncol - 1); |
|
|
400 | |
396 | |
401 | delete talloc; talloc = ta; |
397 | delete talloc; talloc = ta; |
402 | delete ralloc; ralloc = ra; |
398 | delete ralloc; ralloc = ra; |
403 | } |
399 | } |
404 | |
400 | |
… | |
… | |
566 | if (current_screen == scrn) |
562 | if (current_screen == scrn) |
567 | return scrn; |
563 | return scrn; |
568 | |
564 | |
569 | selection_check (2); /* check for boundary cross */ |
565 | selection_check (2); /* check for boundary cross */ |
570 | |
566 | |
571 | SWAP_IT (current_screen, scrn, int); |
567 | i = current_screen; current_screen = scrn; scrn = i; |
572 | |
568 | |
573 | SWAP_IT (screen.cur.row, swap.cur.row, int16_t); |
569 | SWAP_IT (screen.cur.row, swap.cur.row, int16_t); |
574 | SWAP_IT (screen.cur.col, swap.cur.col, int16_t); |
570 | SWAP_IT (screen.cur.col, swap.cur.col, int16_t); |
575 | # ifdef DEBUG_STRICT |
|
|
576 | assert (screen.cur.row >= 0 && screen.cur.row < prev_nrow); |
|
|
577 | assert (screen.cur.col >= 0 && screen.cur.col < prev_ncol); |
|
|
578 | # else /* drive with your eyes closed */ |
|
|
579 | MAX_IT (screen.cur.row, 0); |
571 | MAX_IT (screen.cur.row, 0); |
580 | MIN_IT (screen.cur.row, (int32_t)prev_nrow - 1); |
572 | MIN_IT (screen.cur.row, (int32_t)prev_nrow - 1); |
581 | MAX_IT (screen.cur.col, 0); |
573 | MAX_IT (screen.cur.col, 0); |
582 | MIN_IT (screen.cur.col, (int32_t)prev_ncol - 1); |
574 | MIN_IT (screen.cur.col, (int32_t)prev_ncol - 1); |
583 | # endif |
|
|
584 | |
575 | |
585 | #if NSCREENS |
576 | #if NSCREENS |
586 | if (options & Opt_secondaryScreen) |
577 | if (options & Opt_secondaryScreen) |
587 | { |
578 | { |
588 | num_scr = 0; |
579 | num_scr = 0; |