… | |
… | |
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 | { |
… | |
… | |
335 | scr_scroll_text (0, (int)nrow - 1, -k, 1); |
334 | scr_scroll_text (0, (int)nrow - 1, -k, 1); |
336 | screen.cur.row += k; |
335 | screen.cur.row += k; |
337 | screen.s_cur.row += k; |
336 | screen.s_cur.row += k; |
338 | TermWin.nscrolled -= k; |
337 | TermWin.nscrolled -= k; |
339 | } |
338 | } |
|
|
339 | |
340 | #ifdef DEBUG_STRICT |
340 | #ifdef DEBUG_STRICT |
341 | assert (screen.cur.row < TermWin.nrow); |
341 | assert (screen.cur.row < TermWin.nrow); |
342 | assert (swap.cur.row < TermWin.nrow); |
|
|
343 | #else /* drive with your eyes closed */ |
342 | #else /* drive with your eyes closed */ |
344 | |
|
|
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; |
… | |
… | |
3418 | selection_delimit_word (DN, &selection.end, &selection.end); |
3409 | selection_delimit_word (DN, &selection.end, &selection.end); |
3419 | } |
3410 | } |
3420 | else if (selection.clicks == 3) |
3411 | else if (selection.clicks == 3) |
3421 | { |
3412 | { |
3422 | #if ENABLE_FRILLS |
3413 | #if ENABLE_FRILLS |
3423 | if ((options & Opt_tripleclickwords)) |
3414 | if (options & Opt_tripleclickwords) |
3424 | { |
3415 | { |
3425 | int end_row; |
3416 | int end_row; |
3426 | |
3417 | |
3427 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3418 | selection_delimit_word (UP, &selection.beg, &selection.beg); |
3428 | end_row = screen.tlen[selection.mark.row + TermWin.saveLines]; |
3419 | end_row = screen.tlen[selection.mark.row + TermWin.saveLines]; |
… | |
… | |
3446 | if (ROWCOL_IS_AFTER (selection.mark, selection.beg)) |
3437 | if (ROWCOL_IS_AFTER (selection.mark, selection.beg)) |
3447 | selection.mark.col++; |
3438 | selection.mark.col++; |
3448 | |
3439 | |
3449 | selection.beg.col = 0; |
3440 | selection.beg.col = 0; |
3450 | selection.end.col = ncol; |
3441 | selection.end.col = ncol; |
|
|
3442 | |
|
|
3443 | // select a complete logical line |
|
|
3444 | while (selection.beg.row > -TermWin.saveLines |
|
|
3445 | && screen.tlen[selection.beg.row - 1 + TermWin.saveLines] == -1) |
|
|
3446 | selection.beg.row--; |
|
|
3447 | |
|
|
3448 | while (selection.end.row < TermWin.nrow |
|
|
3449 | && screen.tlen[selection.end.row + TermWin.saveLines] == -1) |
|
|
3450 | selection.end.row++; |
3451 | } |
3451 | } |
3452 | } |
3452 | } |
3453 | |
3453 | |
3454 | if (button3 && buttonpress) |
3454 | if (button3 && buttonpress) |
3455 | { /* mark may need to be changed */ |
3455 | { /* mark may need to be changed */ |