diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-03-03 09:43:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-03-03 09:43:22 +0000 |
commit | f4fdddc9306886e3ab5257f40003f6db83ac926b (patch) | |
tree | 0c2408c8a736a203ecbe35ff8a7f737adceab4e3 /tty.c | |
parent | 4b8bb7770fc06ae61942372ff7edc38b64efb58d (diff) |
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 'tty.c')
-rw-r--r-- | tty.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -480,6 +480,12 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) else tty_putcode(tty, TTYC_RMKX); } + if (changed & MODE_BRACKETPASTE) { + if (mode & MODE_BRACKETPASTE) + tty_puts(tty, "\033[?2004h"); + else + tty_puts(tty, "\033[?2004l"); + } tty->mode = mode; } |