version 1.202, 2022/05/30 13:00:18 |
version 1.203, 2022/06/09 09:12:55 |
|
|
int outlen, state; |
int outlen, state; |
struct screen_write_ctx ctx; |
struct screen_write_ctx ctx; |
struct paste_buffer *pb; |
struct paste_buffer *pb; |
|
const char* allow = "cpqs01234567"; |
|
char flags[sizeof allow] = ""; |
|
u_int i, j = 0; |
|
|
if (wp == NULL) |
if (wp == NULL) |
return; |
return; |
|
|
return; |
return; |
log_debug("%s: %s", __func__, end); |
log_debug("%s: %s", __func__, end); |
|
|
|
for (i = 0; p + i != end; i++) { |
|
if (strchr(allow, p[i]) != NULL && strchr(flags, p[i]) == NULL) |
|
flags[j++] = p[i]; |
|
} |
|
log_debug("%s: %.*s %s", __func__, (int)(end - p - 1), p, flags); |
|
|
if (strcmp(end, "?") == 0) { |
if (strcmp(end, "?") == 0) { |
if ((pb = paste_get_top(NULL)) != NULL) |
if ((pb = paste_get_top(NULL)) != NULL) |
buf = paste_buffer_data(pb, &len); |
buf = paste_buffer_data(pb, &len); |
|
|
} |
} |
|
|
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_setselection(&ctx, out, outlen); |
screen_write_setselection(&ctx, flags, out, outlen); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
notify_pane("pane-set-clipboard", wp); |
notify_pane("pane-set-clipboard", wp); |
|
|