--- rxvt-unicode/src/screen.C 2006/01/19 17:21:20 1.240 +++ rxvt-unicode/src/screen.C 2006/01/19 17:37:01 1.241 @@ -236,13 +236,10 @@ selection.op = SELECTION_CLEAR; selection.screen = PRIMARY; selection.clicks = 0; - CLEAR_ALL_SELECTION (); rvideo = 0; } else { - CLEAR_ALL_SELECTION (); - /* * add or delete rows as appropriate */ @@ -352,8 +349,10 @@ int len = min (min (prev_ncol - pcol, ncol - qcol), llen - lofs); +#if DEBUG_STRICT assert (len); assert (pline.t); +#endif memcpy (qline->t + qcol, pline.t + pcol, len * sizeof (text_t)); memcpy (qline->r + qcol, pline.r + pcol, len * sizeof (rend_t)); @@ -408,6 +407,8 @@ free (tabs); } + CLEAR_ALL_SELECTION (); + prev_nrow = nrow; prev_ncol = ncol;