ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/screen.C
(Generate patch)

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.399 by sf-exg, Thu Nov 3 10:42:17 2011 UTC vs.
Revision 1.402 by root, Tue Nov 15 18:23:46 2011 UTC

681 } 681 }
682 else 682 else
683 scr_blank_screen_mem (l, rstyle); 683 scr_blank_screen_mem (l, rstyle);
684 } 684 }
685 685
686 // move and/or clear selection, if any
687 if (selection.op && current_screen == selection.screen
688 && selection.beg.row <= row2)
689 {
690 selection.beg.row -= count;
691 selection.end.row -= count;
692 selection.mark.row -= count;
693
694 selection_check (0);
695 }
696
686 // finally move the view window, if desired 697 // finally move the view window, if desired
687 if (option (Opt_scrollWithBuffer) 698 if (option (Opt_scrollWithBuffer)
688 && view_start != 0 699 && view_start != 0
689 && view_start != -saveLines) 700 && view_start != -saveLines)
690 scr_page (UP, count); 701 scr_page (UP, count);
692 if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) 703 if (SHOULD_INVOKE (HOOK_SCROLL_BACK))
693 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); 704 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
694 } 705 }
695 else 706 else
696 { 707 {
708 if (selection.op && current_screen == selection.screen)
709 {
710 if ((selection.beg.row < row1 && selection.end.row > row1)
711 || (selection.beg.row < row2 && selection.end.row > row2)
712 || (selection.beg.row - count < row1 && selection.beg.row >= row1)
713 || (selection.beg.row - count > row2 && selection.beg.row <= row2)
714 || (selection.end.row - count < row1 && selection.end.row >= row1)
715 || (selection.end.row - count > row2 && selection.end.row <= row2))
716 {
717 CLEAR_ALL_SELECTION ();
718 selection.op = SELECTION_CLEAR;
719 }
720 else if (selection.end.row >= row1 && selection.end.row <= row2)
721 {
722 /* move selected region too */
723 selection.beg.row -= count;
724 selection.end.row -= count;
725 selection.mark.row -= count;
726
727 selection_check (0);
728 }
729 }
730
697 // use a simple and robust scrolling algorithm, this 731 // use a simple and robust scrolling algorithm, this
698 // part of scr_scroll_text is not time-critical. 732 // part of scr_scroll_text is not time-critical.
699 733
700 // sever line above scroll region 734 // sever line above scroll region
701 if (row1) 735 if (row1)
726 { 760 {
727 line_t &l = ROW(row2); 761 line_t &l = ROW(row2);
728 l.is_longer (0); 762 l.is_longer (0);
729 l.touch (); 763 l.touch ();
730 } 764 }
731 }
732
733 // move and/or clear selection, if any
734 if (selection.op && current_screen == selection.screen)
735 {
736 if ((selection.beg.row < row1 && selection.end.row > row1)
737 || (selection.beg.row < row2 && selection.end.row > row2)
738 || (selection.beg.row - count < row1 && selection.beg.row >= row1)
739 || (selection.beg.row - count > row2 && selection.beg.row <= row2)
740 || (selection.end.row - count < row1 && selection.end.row >= row1)
741 || (selection.end.row - count > row2 && selection.end.row <= row2))
742 CLEAR_ALL_SELECTION ();
743 else if (selection.end.row >= row1 && selection.end.row <= row2)
744 {
745 /* move selected region too */
746 selection.beg.row -= count;
747 selection.end.row -= count;
748 selection.mark.row -= count;
749
750 selection_check (0);
751 }
752 } 765 }
753 766
754 return count; 767 return count;
755} 768}
756 769

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines