… | |
… | |
234 | selection.text = NULL; |
234 | selection.text = NULL; |
235 | selection.len = 0; |
235 | selection.len = 0; |
236 | selection.op = SELECTION_CLEAR; |
236 | selection.op = SELECTION_CLEAR; |
237 | selection.screen = PRIMARY; |
237 | selection.screen = PRIMARY; |
238 | selection.clicks = 0; |
238 | selection.clicks = 0; |
239 | CLEAR_ALL_SELECTION (); |
|
|
240 | rvideo = 0; |
239 | rvideo = 0; |
241 | } |
240 | } |
242 | else |
241 | else |
243 | { |
242 | { |
244 | CLEAR_ALL_SELECTION (); |
|
|
245 | |
|
|
246 | /* |
243 | /* |
247 | * add or delete rows as appropriate |
244 | * add or delete rows as appropriate |
248 | */ |
245 | */ |
249 | |
246 | |
250 | rxvt_salloc *old_ta = talloc; talloc = new rxvt_salloc (ncol * sizeof (text_t)); |
247 | rxvt_salloc *old_ta = talloc; talloc = new rxvt_salloc (ncol * sizeof (text_t)); |
… | |
… | |
350 | |
347 | |
351 | line_t &pline = old_buf [prow]; |
348 | line_t &pline = old_buf [prow]; |
352 | |
349 | |
353 | int len = min (min (prev_ncol - pcol, ncol - qcol), llen - lofs); |
350 | int len = min (min (prev_ncol - pcol, ncol - qcol), llen - lofs); |
354 | |
351 | |
|
|
352 | #if DEBUG_STRICT |
355 | assert (len); |
353 | assert (len); |
356 | assert (pline.t); |
354 | assert (pline.t); |
|
|
355 | #endif |
357 | |
356 | |
358 | memcpy (qline->t + qcol, pline.t + pcol, len * sizeof (text_t)); |
357 | memcpy (qline->t + qcol, pline.t + pcol, len * sizeof (text_t)); |
359 | memcpy (qline->r + qcol, pline.r + pcol, len * sizeof (rend_t)); |
358 | memcpy (qline->r + qcol, pline.r + pcol, len * sizeof (rend_t)); |
360 | |
359 | |
361 | lofs += len; |
360 | lofs += len; |
… | |
… | |
405 | clamp_it (screen.cur.col, 0, ncol - 1); |
404 | clamp_it (screen.cur.col, 0, ncol - 1); |
406 | |
405 | |
407 | if (tabs) |
406 | if (tabs) |
408 | free (tabs); |
407 | free (tabs); |
409 | } |
408 | } |
|
|
409 | |
|
|
410 | CLEAR_ALL_SELECTION (); |
410 | |
411 | |
411 | prev_nrow = nrow; |
412 | prev_nrow = nrow; |
412 | prev_ncol = ncol; |
413 | prev_ncol = ncol; |
413 | |
414 | |
414 | tabs = (char *)rxvt_malloc (ncol * sizeof (char)); |
415 | tabs = (char *)rxvt_malloc (ncol * sizeof (char)); |