… | |
… | |
325 | qline->l = ncol; |
325 | qline->l = ncol; |
326 | qline->is_longer (1); |
326 | qline->is_longer (1); |
327 | |
327 | |
328 | int qcol = 0; |
328 | int qcol = 0; |
329 | |
329 | |
|
|
330 | // see below for cursor adjustment rationale |
|
|
331 | if (p == ocur.row) |
|
|
332 | screen.cur.row = q - (total_rows - nrow); |
|
|
333 | |
330 | // fill a single destination line |
334 | // fill a single destination line |
331 | while (lofs < llen && qcol < ncol) |
335 | while (lofs < llen && qcol < ncol) |
332 | { |
336 | { |
333 | int prow = lofs / prev_ncol; |
337 | int prow = lofs / prev_ncol; |
334 | int pcol = lofs % prev_ncol; |
338 | int pcol = lofs % prev_ncol; |
… | |
… | |
388 | row_buf [row].clear (); scr_blank_screen_mem (row_buf [row], DEFAULT_RSTYLE); |
392 | row_buf [row].clear (); scr_blank_screen_mem (row_buf [row], DEFAULT_RSTYLE); |
389 | } |
393 | } |
390 | |
394 | |
391 | term_start = 0; |
395 | term_start = 0; |
392 | } |
396 | } |
393 | |
|
|
394 | #ifdef DEBUG_STRICT //TODO: remove |
|
|
395 | for (int i = top_row; i < nrow; i++) |
|
|
396 | assert (ROW (i).t); |
|
|
397 | #endif |
|
|
398 | |
397 | |
399 | free (old_buf); |
398 | free (old_buf); |
400 | delete old_ta; |
399 | delete old_ta; |
401 | delete old_ra; |
400 | delete old_ra; |
402 | |
401 | |
… | |
… | |
2800 | * (+) if ownership is claimed but property is empty, rxvt_selection_paste () |
2799 | * (+) if ownership is claimed but property is empty, rxvt_selection_paste () |
2801 | * will auto fallback to CUT_BUFFER0 |
2800 | * will auto fallback to CUT_BUFFER0 |
2802 | * EXT: button 2 release |
2801 | * EXT: button 2 release |
2803 | */ |
2802 | */ |
2804 | void |
2803 | void |
2805 | rxvt_term::selection_request (Time tm, int x, int y) |
2804 | rxvt_term::selection_request (Time tm) |
2806 | { |
2805 | { |
2807 | if (x < 0 || x >= width || y < 0 || y >= height) |
|
|
2808 | return; /* outside window */ |
|
|
2809 | |
|
|
2810 | if (selection.text) |
2806 | if (selection.text) |
2811 | { /* internal selection */ |
2807 | { /* internal selection */ |
2812 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2808 | char *str = rxvt_wcstombs (selection.text, selection.len); |
2813 | paste (str, strlen (str)); |
2809 | paste (str, strlen (str)); |
2814 | free (str); |
2810 | free (str); |