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.400 by sf-exg, Tue Nov 15 02:24:25 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 {
689 selection.beg.row -= count;
690 selection.end.row -= count;
691 selection.mark.row -= count;
692
693 selection_check (0);
694 }
695
686 // finally move the view window, if desired 696 // finally move the view window, if desired
687 if (option (Opt_scrollWithBuffer) 697 if (option (Opt_scrollWithBuffer)
688 && view_start != 0 698 && view_start != 0
689 && view_start != -saveLines) 699 && view_start != -saveLines)
690 scr_page (UP, count); 700 scr_page (UP, count);
692 if (SHOULD_INVOKE (HOOK_SCROLL_BACK)) 702 if (SHOULD_INVOKE (HOOK_SCROLL_BACK))
693 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END)); 703 HOOK_INVOKE ((this, HOOK_SCROLL_BACK, DT_INT, count, DT_INT, top_row, DT_END));
694 } 704 }
695 else 705 else
696 { 706 {
707 if (selection.op && current_screen == selection.screen)
708 {
709 if ((selection.beg.row < row1 && selection.end.row > row1)
710 || (selection.beg.row < row2 && selection.end.row > row2)
711 || (selection.beg.row - count < row1 && selection.beg.row >= row1)
712 || (selection.beg.row - count > row2 && selection.beg.row <= row2)
713 || (selection.end.row - count < row1 && selection.end.row >= row1)
714 || (selection.end.row - count > row2 && selection.end.row <= row2))
715 {
716 CLEAR_ALL_SELECTION ();
717 selection.op = SELECTION_CLEAR;
718 }
719 else if (selection.end.row >= row1 && selection.end.row <= row2)
720 {
721 /* move selected region too */
722 selection.beg.row -= count;
723 selection.end.row -= count;
724 selection.mark.row -= count;
725
726 selection_check (0);
727 }
728 }
729
697 // use a simple and robust scrolling algorithm, this 730 // use a simple and robust scrolling algorithm, this
698 // part of scr_scroll_text is not time-critical. 731 // part of scr_scroll_text is not time-critical.
699 732
700 // sever line above scroll region 733 // sever line above scroll region
701 if (row1) 734 if (row1)
726 { 759 {
727 line_t &l = ROW(row2); 760 line_t &l = ROW(row2);
728 l.is_longer (0); 761 l.is_longer (0);
729 l.touch (); 762 l.touch ();
730 } 763 }
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 } 764 }
753 765
754 return count; 766 return count;
755} 767}
756 768

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines