Change pasting to bypass the output key processing entirely and write

what was originally received. Fixes problems with pasted text being
interpreted as extended keys reported by Mark Kelly.
This commit is contained in:
nicm
2024-10-01 06:15:47 +00:00
parent 89adec0ca5
commit 17bab32794
7 changed files with 106 additions and 40 deletions

View File

@ -73,11 +73,13 @@ cmd_send_keys_inject_key(struct cmdq_item *item, struct cmdq_item *after,
if (args_has(args, 'K')) {
if (tc == NULL)
return (item);
event = xmalloc(sizeof *event);
event = xcalloc(1, sizeof *event);
event->key = key|KEYC_SENT;
memset(&event->m, 0, sizeof event->m);
if (server_client_handle_key(tc, event) == 0)
if (server_client_handle_key(tc, event) == 0) {
free(event->buf);
free(event);
}
return (item);
}