paste-buffer should be per pane, from C. Coutinho.

This commit is contained in:
Nicholas Marriott 2010-03-18 21:02:41 +00:00
parent a2c87eb899
commit 2307b91ecb
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-paste-buffer.c,v 1.24 2009-12-04 22:14:47 tcunha Exp $ */ /* $Id: cmd-paste-buffer.c,v 1.25 2010-03-18 21:02:41 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -31,7 +31,7 @@ void cmd_paste_buffer_lf2cr(struct window_pane *, const char *, size_t);
const struct cmd_entry cmd_paste_buffer_entry = { const struct cmd_entry cmd_paste_buffer_entry = {
"paste-buffer", "pasteb", "paste-buffer", "pasteb",
"[-dr] " CMD_BUFFER_WINDOW_USAGE, "[-dr] " CMD_BUFFER_PANE_USAGE,
0, "dr", 0, "dr",
cmd_buffer_init, cmd_buffer_init,
cmd_buffer_parse, cmd_buffer_parse,
@ -49,9 +49,8 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
struct session *s; struct session *s;
struct paste_buffer *pb; struct paste_buffer *pb;
if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL) if ((wl = cmd_find_pane(ctx, data->target, &s, &wp)) == NULL)
return (-1); return (-1);
wp = wl->window->active;
if (data->buffer == -1) if (data->buffer == -1)
pb = paste_get_top(&s->buffers); pb = paste_get_top(&s->buffers);

7
tmux.1
View File

@ -1,4 +1,4 @@
.\" $Id: tmux.1,v 1.240 2010-03-16 17:51:32 nicm Exp $ .\" $Id: tmux.1,v 1.241 2010-03-18 21:02:41 nicm Exp $
.\" .\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\" .\"
@ -2360,10 +2360,11 @@ Load the contents of the specified paste buffer from
.It Xo Ic paste-buffer .It Xo Ic paste-buffer
.Op Fl dr .Op Fl dr
.Op Fl b Ar buffer-index .Op Fl b Ar buffer-index
.Op Fl t Ar target-window .Op Fl t Ar target-pane
.Xc .Xc
.D1 (alias: Ic pasteb ) .D1 (alias: Ic pasteb )
Insert the contents of a paste buffer into the current window. Insert the contents of a paste buffer into the specified pane.
If not specified, paste into the current one.
With With
.Fl d , .Fl d ,
also delete the paste buffer from the stack. also delete the paste buffer from the stack.