*** empty log message ***
authorroot <root>
Mon, 26 Dec 2005 21:30:04 +0000 (21:30 +0000)
committerroot <root>
Mon, 26 Dec 2005 21:30:04 +0000 (21:30 +0000)
Changes
src/screen.C

diff --git a/Changes b/Changes
index bc4416f3b8634f43b13ae6e7665e55d968a6dd18..620425f2358d2afb64e82108e94e33ad9899083e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -10,6 +10,10 @@ WISH: meta-tagging of data by regex/master process (my dream project)
 WISH: OnTheSpot editing, or maybe switch to miiiiiiif
 WISH: just for fun, do shade and tint with XRender.
 
+6.1
+       - fix a crash when the selection scrolls out of the scrollback
+          while the user still drags.
+
 6.0  Sat Dec 24 13:58:56 CET 2005
        - make it compile without SMART_RESIZE again.
         - enable slow link support by default.
index 513205a50e43df7017b67235641a8283bf5b3c85..e285c855ed1dfd3eb94b298621a5f15df87aab8d 100644 (file)
@@ -622,7 +622,13 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count)
           selection.end.row  -= count;
           selection.mark.row -= count;
 
-          selection_check (0);
+          if (selection.beg.row < -nsaved
+              || selection.end.row < -nsaved
+              || selection.mark.row < -nsaved)
+            {
+              CLEAR_ALL_SELECTION ();
+              selection.op = SELECTION_CLEAR;
+            }
         }
 
       for (int i = count; i--; )
@@ -637,20 +643,17 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count)
     {
       if (selection.op && current_screen == selection.screen)
         {
-          int i = selection.beg.row;
-          int j = selection.end.row;
-
-          if ((i < row1 && j > row1)
-              || (i < row2 && j > row2)
-              || (i - count < row1 && i >= row1)
-              || (i - count > row2 && i <= row2)
-              || (j - count < row1 && j >= row1)
-              || (j - count > row2 && j <= row2))
+          if ((selection.beg.row < row1 && selection.end.row > row1)
+              || (selection.beg.row < row2 && selection.end.row > row2)
+              || (selection.beg.row - count < row1 && selection.beg.row >= row1)
+              || (selection.beg.row - count > row2 && selection.beg.row <= row2)
+              || (selection.end.row - count < row1 && selection.end.row >= row1)
+              || (selection.end.row - count > row2 && selection.end.row <= row2))
             {
               CLEAR_ALL_SELECTION ();
-              selection.op = SELECTION_CLEAR;  /* XXX: too aggressive? */
+              selection.op = SELECTION_CLEAR;
             }
-          else if (j >= row1 && j <= row2)
+          else if (selection.end.row >= row1 && selection.end.row <= row2)
             {
               /* move selected region too */
               selection.beg.row  -= count;