Add a hook when the clipboard is set.

This commit is contained in:
nicm
2017-06-09 09:21:24 +00:00
parent 8c4ae1c938
commit 74b2deae1c
3 changed files with 13 additions and 4 deletions

View File

@ -1633,6 +1633,7 @@ window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf,
screen_write_start(&ctx, wp, NULL);
screen_write_setselection(&ctx, buf, len);
screen_write_stop(&ctx);
notify_pane("pane-set-clipboard", wp);
}
if (paste_set(buf, len, bufname, NULL) != 0)
@ -1690,6 +1691,7 @@ window_copy_append_selection(struct window_pane *wp, const char *bufname)
screen_write_start(&ctx, wp, NULL);
screen_write_setselection(&ctx, buf, len);
screen_write_stop(&ctx);
notify_pane("pane-set-clipboard", wp);
}
if (bufname == NULL || *bufname == '\0')