From f4fdddc9306886e3ab5257f40003f6db83ac926b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 3 Mar 2012 09:43:22 +0000 Subject: 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. --- input.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index 3bbb7ef2..c12e1b29 100644 --- a/input.c +++ b/input.c @@ -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; -- cgit