version 1.24, 2015/10/27 15:58:42 |
version 1.25, 2015/11/12 11:09:11 |
|
|
char *action, *action_data; |
char *action, *action_data; |
const char *template; |
const char *template; |
u_int idx; |
u_int idx; |
int utf8flag; |
|
|
|
if ((c = cmd_find_client(cmdq, NULL, 1)) == NULL) { |
if ((c = cmd_find_client(cmdq, NULL, 1)) == NULL) { |
cmdq_error(cmdq, "no client available"); |
cmdq_error(cmdq, "no client available"); |
|
|
|
|
if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL) |
if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL) |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
utf8flag = options_get_number(wl->window->options, "utf8"); |
|
|
|
if (paste_get_top(NULL) == NULL) |
if (paste_get_top(NULL) == NULL) |
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |
|
|
cdata->idx = idx; |
cdata->idx = idx; |
|
|
cdata->ft_template = xstrdup(template); |
cdata->ft_template = xstrdup(template); |
format_defaults_paste_buffer(cdata->ft, pb, utf8flag); |
format_defaults_paste_buffer(cdata->ft, pb); |
|
|
xasprintf(&action_data, "%s", paste_buffer_name(pb)); |
xasprintf(&action_data, "%s", paste_buffer_name(pb)); |
cdata->command = cmd_template_replace(action, action_data, 1); |
cdata->command = cmd_template_replace(action, action_data, 1); |