… | |
… | |
30 | |
30 | |
31 | #include <inttypes.h> |
31 | #include <inttypes.h> |
32 | |
32 | |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
34 | |
34 | |
|
|
35 | static inline void |
35 | static inline void fill_text (text_t *start, text_t value, int len) |
36 | fill_text (text_t *start, text_t value, int len) |
36 | { |
37 | { |
37 | while (len--) |
38 | while (len--) |
38 | *start++ = value; |
39 | *start++ = value; |
39 | } |
40 | } |
40 | |
41 | |
… | |
… | |
1338 | min_it (num, nrow - row); |
1339 | min_it (num, nrow - row); |
1339 | |
1340 | |
1340 | // TODO: the code below does not work when view_start != 0 |
1341 | // TODO: the code below does not work when view_start != 0 |
1341 | // the workaround is to disable the clear and use a normal refresh |
1342 | // the workaround is to disable the clear and use a normal refresh |
1342 | // when view_start != 0. mysterious. |
1343 | // when view_start != 0. mysterious. |
1343 | if (rstyle & (RS_RVid | RS_Uline)) |
1344 | if (rstyle & (RS_Blink | RS_RVid | RS_Uline)) |
1344 | ren = (rend_t) ~RS_None; |
1345 | ren = (rend_t) ~RS_None; |
1345 | else if (GET_BASEBG (rstyle) == Color_bg) |
1346 | else if (GET_BASEBG (rstyle) == Color_bg) |
1346 | { |
1347 | { |
1347 | ren = DEFAULT_RSTYLE; |
1348 | ren = DEFAULT_RSTYLE; |
1348 | |
1349 | |
… | |
… | |
2328 | if (ISSET_PIXCOLOR (Color_HTC)) |
2329 | if (ISSET_PIXCOLOR (Color_HTC)) |
2329 | fore = Color_HTC; |
2330 | fore = Color_HTC; |
2330 | // if invert is 0 reverse video is set so we use bg color as fg color |
2331 | // if invert is 0 reverse video is set so we use bg color as fg color |
2331 | else if (!invert) |
2332 | else if (!invert) |
2332 | fore = back; |
2333 | fore = back; |
|
|
2334 | |
2333 | back = Color_HC; |
2335 | back = Color_HC; |
2334 | invert = 0; |
2336 | invert = 0; |
2335 | } |
2337 | } |
2336 | } |
2338 | } |
2337 | #endif |
2339 | #endif |
… | |
… | |
2972 | selection.clip_text = NULL; |
2974 | selection.clip_text = NULL; |
2973 | selection.clip_len = 0; |
2975 | selection.clip_len = 0; |
2974 | |
2976 | |
2975 | if (display->clipboard_owner == this) |
2977 | if (display->clipboard_owner == this) |
2976 | display->clipboard_owner = 0; |
2978 | display->clipboard_owner = 0; |
2977 | } |
|
|
2978 | } |
|
|
2979 | |
|
|
2980 | void |
|
|
2981 | rxvt_term::clipboard_copy (Time tm) |
|
|
2982 | { |
|
|
2983 | if (selection.len > 0) |
|
|
2984 | { |
|
|
2985 | free (selection.clip_text); |
|
|
2986 | selection.clip_len = selection.len; |
|
|
2987 | selection.clip_text = (wchar_t *) malloc (sizeof (wchar_t) * selection.clip_len); |
|
|
2988 | memcpy (selection.clip_text, selection.text, |
|
|
2989 | sizeof (wchar_t) * selection.clip_len); |
|
|
2990 | selection_grab (tm, true); |
|
|
2991 | } |
2979 | } |
2992 | } |
2980 | } |
2993 | |
2981 | |
2994 | /* ------------------------------------------------------------------------- */ |
2982 | /* ------------------------------------------------------------------------- */ |
2995 | /* |
2983 | /* |