summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-choose-buffer.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-12-30 23:16:18 +0000
committernicm <nicm@openbsd.org>2010-12-30 23:16:18 +0000
commiteca05f1fc0ec6fc9c207193ddcba9f00995f6fdc (patch)
treecdf0e9851374e23108b26ce7898d7395f78cbbb4 /usr.bin/tmux/cmd-choose-buffer.c
parentbe more cynical about boot-time entropy, and fold time and entropy data in. (diff)
downloadwireguard-openbsd-eca05f1fc0ec6fc9c207193ddcba9f00995f6fdc.tar.xz
wireguard-openbsd-eca05f1fc0ec6fc9c207193ddcba9f00995f6fdc.zip
Change from a per-session stack of buffers to one global stack which is
much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux/cmd-choose-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-choose-buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-choose-buffer.c b/usr.bin/tmux/cmd-choose-buffer.c
index 8fb8100c142..93184c73476 100644
--- a/usr.bin/tmux/cmd-choose-buffer.c
+++ b/usr.bin/tmux/cmd-choose-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-buffer.c,v 1.1 2010/06/21 21:44:09 nicm Exp $ */
+/* $OpenBSD: cmd-choose-buffer.c,v 1.2 2010/12/30 23:16:18 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -67,14 +67,14 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
return (-1);
- if (paste_get_top(&s->buffers) == NULL)
+ if (paste_get_top(&global_buffers) == NULL)
return (0);
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0)
return (0);
idx = 0;
- while ((pb = paste_walk_stack(&s->buffers, &idx)) != NULL) {
+ while ((pb = paste_walk_stack(&global_buffers, &idx)) != NULL) {
tmp = paste_print(pb, 50);
window_choose_add(wl->window->active, idx - 1,
"%u: %zu bytes: \"%s\"", idx - 1, pb->size, tmp);