diff options
author | nicm <nicm> | 2017-06-03 17:43:01 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-06-03 17:43:01 +0000 |
commit | 34420660545611af1b24060f55551ebe90d67a0c (patch) | |
tree | dc8ed2211b384a13e81fce8118edf43efbc4d6f1 /input.c | |
parent | 493a1846d070f647655bed663c1cb444ee132093 (diff) | |
download | rtmux-34420660545611af1b24060f55551ebe90d67a0c.tar.gz rtmux-34420660545611af1b24060f55551ebe90d67a0c.tar.bz2 rtmux-34420660545611af1b24060f55551ebe90d67a0c.zip |
Make set-clipboard a three-state option so tmux itself can ignore the
sequencess.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -2103,9 +2103,13 @@ input_osc_52(struct window_pane *wp, const char *p) char *end; size_t len; u_char *out; - int outlen; + int outlen, state; struct screen_write_ctx ctx; + state = options_get_number(global_options, "set-clipboard"); + if (state != 2) + return; + if ((end = strchr(p, ';')) == NULL) return; end++; @@ -2122,11 +2126,10 @@ input_osc_52(struct window_pane *wp, const char *p) return; } - if (options_get_number(global_options, "set-clipboard")) { - screen_write_start(&ctx, wp, NULL); - screen_write_setselection(&ctx, out, outlen); - screen_write_stop(&ctx); - } + screen_write_start(&ctx, wp, NULL); + screen_write_setselection(&ctx, out, outlen); + screen_write_stop(&ctx); + paste_add(out, outlen); } |