summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-10 07:44:26 +0000
committernicm <nicm@openbsd.org>2020-04-10 07:44:26 +0000
commitcdfe74ade09b697913dc61e107ba3b14abd8106e (patch)
tree43a1bc8ae99155ba554f58e9ee873404f296c91d /usr.bin/tmux/window.c
parentPlace the 64bit key on the stack instead of malloc(9)in' it in pppx_if_find(). (diff)
downloadwireguard-openbsd-cdfe74ade09b697913dc61e107ba3b14abd8106e.tar.xz
wireguard-openbsd-cdfe74ade09b697913dc61e107ba3b14abd8106e.zip
Now that copy mode copies the pane content rather than keeping a
reference to it, it isn't necessary that the pane in copy mode is the same as the one copying from. Add a -s flag to copy-mode to specify a different pane for the source content. This means it is possible to view two places in a pane's history at the same time in different panes, or copy from a pane's history into an editor or shell in the same pane. From Anindya Mukherjee.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index fff57abdfeb..c866fb67ccc 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.254 2020/04/09 13:49:21 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.255 2020/04/10 07:44:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1067,8 +1067,9 @@ window_pane_get_palette(struct window_pane *wp, int c)
}
int
-window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode,
- struct cmd_find_state *fs, struct args *args)
+window_pane_set_mode(struct window_pane *wp, struct window_pane *swp,
+ const struct window_mode *mode, struct cmd_find_state *fs,
+ struct args *args)
{
struct window_mode_entry *wme;
@@ -1085,6 +1086,7 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode,
} else {
wme = xcalloc(1, sizeof *wme);
wme->wp = wp;
+ wme->swp = swp;
wme->mode = mode;
wme->prefix = 1;
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);