From: root Date: Mon, 26 Dec 2005 21:30:04 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=27043a1e15bbfb06ad712a44a80569bcfc2ead37;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index bc4416f3..620425f2 100644 --- 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. diff --git a/src/screen.C b/src/screen.C index 513205a5..e285c855 100644 --- a/src/screen.C +++ b/src/screen.C @@ -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;