diff options
author | 2012-03-03 09:43:22 +0000 | |
---|---|---|
committer | 2012-03-03 09:43:22 +0000 | |
commit | 7e9c16f9e1a370b3c27f90b274db22d11cc1efb9 (patch) | |
tree | 423c7da48b26f41ea84847f088e3dc76c4d422fa /usr.bin/tmux/input.c | |
parent | While we guarantee that a zero-filled sem_t variable will trigger (diff) | |
download | wireguard-openbsd-7e9c16f9e1a370b3c27f90b274db22d11cc1efb9.tar.xz wireguard-openbsd-7e9c16f9e1a370b3c27f90b274db22d11cc1efb9.zip |
Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 3094a81de9a..6954dcd599a 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.48 2012/02/02 00:10:12 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.49 2012/03/03 09:43:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1212,6 +1212,9 @@ input_csi_dispatch(struct input_ctx *ictx) case 1049: window_pane_alternate_off(wp, &ictx->cell); break; + case 2004: + screen_write_bracketpaste(&ictx->ctx, 0); + break; default: log_debug("%s: unknown '%c'", __func__, ictx->ch); break; @@ -1264,6 +1267,9 @@ input_csi_dispatch(struct input_ctx *ictx) case 1049: window_pane_alternate_on(wp, &ictx->cell); break; + case 2004: + screen_write_bracketpaste(&ictx->ctx, 1); + break; default: log_debug("%s: unknown '%c'", __func__, ictx->ch); break; |