aboutsummaryrefslogtreecommitdiff
path: root/cmd-refresh-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2018-10-11 16:20:14 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2018-10-11 16:20:14 +0100
commitc88e945bc5e59bed8eaa41f1e66a9b03a2dad807 (patch)
tree23660e7664fbb724edb298a9c7a75c30e08b45da /cmd-refresh-client.c
parent018f1b8a803f15910781dc9894fbd168cfa50943 (diff)
downloadrtmux-c88e945bc5e59bed8eaa41f1e66a9b03a2dad807.tar.gz
rtmux-c88e945bc5e59bed8eaa41f1e66a9b03a2dad807.tar.bz2
rtmux-c88e945bc5e59bed8eaa41f1e66a9b03a2dad807.zip
Support OSC 52 ? to read the top buffer inside tmux, also add
refresh-client -l to get the clipboard outside tmux. GitHub issue 1477.
Diffstat (limited to 'cmd-refresh-client.c')
-rw-r--r--cmd-refresh-client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd-refresh-client.c b/cmd-refresh-client.c
index 4c24b1ea..e5ae099f 100644
--- a/cmd-refresh-client.c
+++ b/cmd-refresh-client.c
@@ -33,8 +33,8 @@ const struct cmd_entry cmd_refresh_client_entry = {
.name = "refresh-client",
.alias = "refresh",
- .args = { "cC:DLRSt:U", 0, 1 },
- .usage = "[-cDLRSU] [-C size] " CMD_TARGET_CLIENT_USAGE " [adjustment]",
+ .args = { "cC:DlLRSt:U", 0, 1 },
+ .usage = "[-cDlLRSU] [-C size] " CMD_TARGET_CLIENT_USAGE " [adjustment]",
.flags = CMD_AFTERHOOK,
.exec = cmd_refresh_client_exec
@@ -104,7 +104,10 @@ cmd_refresh_client_exec(struct cmd *self, struct cmdq_item *item)
return (CMD_RETURN_NORMAL);
}
- 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);