summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-capture-pane.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-05-08 16:18:04 +0000
committernicm <nicm@openbsd.org>2015-05-08 16:18:04 +0000
commit6c01012e1b2514797b55a5c7785e5a5f3e69fa71 (patch)
tree538b15a52228357f38d4884982b1877c45894fa8 /usr.bin/tmux/cmd-capture-pane.c
parentRemove some stuff that accidentally ended up here from portable, and (diff)
downloadwireguard-openbsd-6c01012e1b2514797b55a5c7785e5a5f3e69fa71.tar.xz
wireguard-openbsd-6c01012e1b2514797b55a5c7785e5a5f3e69fa71.zip
Move input parser structs into input.c (removing fairly useless
saved_cursor_[xy] formats as a side-effect).
Diffstat (limited to 'usr.bin/tmux/cmd-capture-pane.c')
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c
index 957dc47b0ca..14cfabcb934 100644
--- a/usr.bin/tmux/cmd-capture-pane.c
+++ b/usr.bin/tmux/cmd-capture-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-capture-pane.c,v 1.31 2015/03/31 17:45:10 nicm Exp $ */
+/* $OpenBSD: cmd-capture-pane.c,v 1.32 2015/05/08 16:18:04 nicm Exp $ */
/*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net>
@@ -57,15 +57,17 @@ char *
cmd_capture_pane_pending(struct args *args, struct window_pane *wp,
size_t *len)
{
- char *buf, *line, tmp[5];
- size_t linelen;
- u_int i;
+ struct evbuffer *pending;
+ char *buf, *line, tmp[5];
+ size_t linelen;
+ u_int i;
- if (wp->ictx.since_ground == NULL)
+ pending = input_pending(wp);
+ if (pending == NULL)
return (xstrdup(""));
- line = EVBUFFER_DATA(wp->ictx.since_ground);
- linelen = EVBUFFER_LENGTH(wp->ictx.since_ground);
+ line = EVBUFFER_DATA(pending);
+ linelen = EVBUFFER_LENGTH(pending);
buf = xstrdup("");
if (args_has(args, 'C')) {