summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/paste.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-08-25 13:13:20 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-08-25 13:13:20 +0000
commit1910644611fb8118754549f7bd25101f9d025b6c (patch)
treeeda79aaa8cfe7f317af1a41317540c78ce9adf97 /usr.bin/tmux/paste.c
parent65beefae8286867f469f352cf566fa6de7dff275 (diff)
Don't allow pasting into input-disabled panes, from Anish R Athalye.
Diffstat (limited to 'usr.bin/tmux/paste.c')
-rw-r--r--usr.bin/tmux/paste.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c
index c9339b205db..fb56c003653 100644
--- a/usr.bin/tmux/paste.c
+++ b/usr.bin/tmux/paste.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paste.c,v 1.21 2014/06/20 11:00:19 nicm Exp $ */
+/* $OpenBSD: paste.c,v 1.22 2014/08/25 13:13:19 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -298,6 +298,9 @@ paste_send_pane(struct paste_buffer *pb, struct window_pane *wp,
const char *data = pb->data, *end = data + pb->size, *lf;
size_t seplen;
+ if (wp->flags & PANE_INPUTOFF)
+ return;
+
if (bracket)
bufferevent_write(wp->event, "\033[200~", 6);