… | |
… | |
620 | top_row = max (top_row - count, -saveLines); |
620 | top_row = max (top_row - count, -saveLines); |
621 | |
621 | |
622 | // scroll everything up 'count' lines |
622 | // scroll everything up 'count' lines |
623 | term_start = (term_start + count) % total_rows; |
623 | term_start = (term_start + count) % total_rows; |
624 | |
624 | |
|
|
625 | // sever bottommost line |
625 | { |
626 | { |
626 | // severe bottommost scrolled line |
|
|
627 | line_t &l = ROW(row2 - count); |
627 | line_t &l = ROW(row2 - count); |
|
|
628 | l.is_longer (0); |
628 | l.touch (); |
629 | l.touch (); |
629 | l.is_longer (0); |
|
|
630 | } |
630 | } |
631 | |
631 | |
632 | // erase newly scorlled-in lines |
632 | // erase newly scrolled-in lines |
633 | for (int i = count; i; --i ) |
633 | for (int i = count; i--; ) |
634 | { |
634 | { |
635 | // basically this is a slightly optimized scr_blank_screen_mem |
635 | // basically this is a slightly optimized scr_blank_screen_mem |
636 | // it is worth the effort on slower machines |
636 | // it is worth the effort on slower machines |
637 | line_t &l = ROW(nrow - i); |
637 | line_t &l = ROW(nrow - 1 - i); |
638 | |
638 | |
639 | scr_blank_line (l, 0, l.l, rstyle); |
639 | scr_blank_line (l, 0, l.l, rstyle); |
640 | |
640 | |
641 | l.l = 0; |
641 | l.l = 0; |
642 | l.f = 0; |
642 | l.f = 0; |
… | |
… | |
817 | CLEAR_SELECTION (); |
817 | CLEAR_SELECTION (); |
818 | } |
818 | } |
819 | |
819 | |
820 | if (screen.flags & Screen_WrapNext) |
820 | if (screen.flags & Screen_WrapNext) |
821 | { |
821 | { |
822 | max_it (line->l, ncol); |
|
|
823 | line->is_longer (1); |
|
|
824 | |
|
|
825 | scr_do_wrap (); |
822 | scr_do_wrap (); |
826 | |
823 | |
|
|
824 | line->l = ncol; |
|
|
825 | line->is_longer (1); |
|
|
826 | |
827 | row = screen.cur.row; |
827 | row = screen.cur.row; |
828 | line = &ROW(row); /* _must_ refresh */ |
828 | line = &ROW(row); /* _must_ refresh */ |
829 | } |
829 | } |
830 | |
830 | |
831 | // some utf-8 decoders "decode" surrogate characters: let's fix this. |
831 | // some utf-8 decoders "decode" surrogate characters: let's fix this. |
… | |
… | |
2800 | * (+) if ownership is claimed but property is empty, rxvt_selection_paste () |
2800 | * (+) if ownership is claimed but property is empty, rxvt_selection_paste () |
2801 | * will auto fallback to CUT_BUFFER0 |
2801 | * will auto fallback to CUT_BUFFER0 |
2802 | * EXT: button 2 release |
2802 | * EXT: button 2 release |
2803 | */ |
2803 | */ |
2804 | void |
2804 | void |
2805 | rxvt_term::selection_request (Time tm, int x, int y) |
2805 | rxvt_term::selection_request (Time tm) |
2806 | { |
2806 | { |
2807 | if (x < 0 || x >= width || y < 0 || y >= height) |
|
|
2808 | return; /* outside window */ |
|
|
2809 | |
|
|
2810 | if (selection.text) |
2807 | if (selection.text) |
2811 | { /* internal selection */ |
2808 | { /* internal selection */ |
2812 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2809 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2813 | paste (str, strlen (str)); |
2810 | paste (str, strlen (str)); |
2814 | free (str); |
2811 | free (str); |