version 1.292, 2020/06/02 08:17:27 |
version 1.293, 2020/06/02 19:10:26 |
|
|
buf = window_copy_match_at_cursor(data); |
buf = window_copy_match_at_cursor(data); |
if (buf != NULL) |
if (buf != NULL) |
*len = strlen(buf); |
*len = strlen(buf); |
|
else |
|
*len = 0; |
return (buf); |
return (buf); |
} |
} |
|
|
|
|
/* Don't bother if no data. */ |
/* Don't bother if no data. */ |
if (off == 0) { |
if (off == 0) { |
free(buf); |
free(buf); |
|
*len = 0 |
return (NULL); |
return (NULL); |
} |
} |
if (keys == MODEKEY_EMACS || lastex <= ey_last) |
if (keys == MODEKEY_EMACS || lastex <= ey_last) |
|
|
struct job *job; |
struct job *job; |
|
|
buf = window_copy_get_selection(wme, &len); |
buf = window_copy_get_selection(wme, &len); |
if (buf == NULL) |
|
return; |
|
|
|
if (cmd == NULL || *cmd == '\0') |
if (cmd == NULL || *cmd == '\0') |
cmd = options_get_string(global_options, "copy-command"); |
cmd = options_get_string(global_options, "copy-command"); |
if (cmd != NULL && *cmd != '\0') { |
if (cmd != NULL && *cmd != '\0') { |
|
|
-1, -1); |
-1, -1); |
bufferevent_write(job_get_event(job), buf, len); |
bufferevent_write(job_get_event(job), buf, len); |
} |
} |
window_copy_copy_buffer(wme, prefix, buf, len); |
if (buf != NULL) |
|
window_copy_copy_buffer(wme, prefix, buf, len); |
} |
} |
|
|
static void |
static void |