diff options
author | nicm <nicm> | 2018-10-18 08:04:14 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-10-18 08:04:14 +0000 |
commit | a51668ca0690b84762c5a2f2dd34b94fa566f559 (patch) | |
tree | 373f8cfc6b0381e314c2bb18c3945260324fdcb3 /cmd-refresh-client.c | |
parent | bc0e527f32642cc9eb2354d1bdc033ab6beca33b (diff) | |
download | rtmux-a51668ca0690b84762c5a2f2dd34b94fa566f559.tar.gz rtmux-a51668ca0690b84762c5a2f2dd34b94fa566f559.tar.bz2 rtmux-a51668ca0690b84762c5a2f2dd34b94fa566f559.zip |
Support OSC 52 ? to read the top buffer inside tmux (when set-clipboard
is changed to on), also add refresh-client -l to ask tmux to use the
same mechanism to get the clipboard from the terminal outside
tmux. GitHub issue 1477.
Diffstat (limited to 'cmd-refresh-client.c')
-rw-r--r-- | cmd-refresh-client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd-refresh-client.c b/cmd-refresh-client.c index df1d2135..0f45c2d5 100644 --- a/cmd-refresh-client.c +++ b/cmd-refresh-client.c @@ -31,8 +31,8 @@ const struct cmd_entry cmd_refresh_client_entry = { .name = "refresh-client", .alias = "refresh", - .args = { "C:St:", 0, 0 }, - .usage = "[-S] [-C size] " CMD_TARGET_CLIENT_USAGE, + .args = { "C:lSt:", 0, 0 }, + .usage = "[-lS] [-C size] " CMD_TARGET_CLIENT_USAGE, .flags = CMD_AFTERHOOK, .exec = cmd_refresh_client_exec @@ -49,7 +49,10 @@ cmd_refresh_client_exec(struct cmd *self, struct cmdq_item *item) if ((c = cmd_find_client(item, args_get(args, 't'), 0)) == NULL) return (CMD_RETURN_ERROR); - if (args_has(args, 'C')) { + if (args_has(args, 'l')) { + if (c->session != NULL) + tty_putcode_ptr2(&c->tty, TTYC_MS, "", "?"); + } else if (args_has(args, 'C')) { if ((size = args_get(args, 'C')) == NULL) { cmdq_error(item, "missing size"); return (CMD_RETURN_ERROR); |