mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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.
This commit is contained in:
@ -878,6 +878,18 @@ screen_write_mousemode_on(struct screen_write_ctx *ctx, int mode)
|
||||
s->mode |= mode;
|
||||
}
|
||||
|
||||
/* Set bracketed paste mode. */
|
||||
void
|
||||
screen_write_bracketpaste(struct screen_write_ctx *ctx, int state)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
|
||||
if (state)
|
||||
s->mode |= MODE_BRACKETPASTE;
|
||||
else
|
||||
s->mode &= ~MODE_BRACKETPASTE;
|
||||
}
|
||||
|
||||
/* Line feed. */
|
||||
void
|
||||
screen_write_linefeed(struct screen_write_ctx *ctx, int wrapped)
|
||||
|
Reference in New Issue
Block a user