summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/cmd-clock-mode.c10
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c8
-rw-r--r--usr.bin/tmux/cmd-scroll-mode.c8
-rw-r--r--usr.bin/tmux/cmd-send-keys.c14
-rw-r--r--usr.bin/tmux/cmd-send-prefix.c10
-rw-r--r--usr.bin/tmux/tmux.112
6 files changed, 28 insertions, 34 deletions
diff --git a/usr.bin/tmux/cmd-clock-mode.c b/usr.bin/tmux/cmd-clock-mode.c
index 89231c8e89f..5f7c29e3f14 100644
--- a/usr.bin/tmux/cmd-clock-mode.c
+++ b/usr.bin/tmux/cmd-clock-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-clock-mode.c,v 1.3 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: cmd-clock-mode.c,v 1.4 2009/08/18 16:21:04 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -28,7 +28,7 @@ int cmd_clock_mode_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_clock_mode_entry = {
"clock-mode", NULL,
- CMD_TARGET_WINDOW_USAGE,
+ CMD_TARGET_PANE_USAGE,
0, 0,
cmd_target_init,
cmd_target_parse,
@@ -41,12 +41,12 @@ int
cmd_clock_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
- struct winlink *wl;
+ struct window_pane *wp;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- window_pane_set_mode(wl->window->active, &window_clock_mode);
+ window_pane_set_mode(wp, &window_clock_mode);
return (0);
}
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index 6e9a1f3ddd7..90cbc5b1699 100644
--- a/usr.bin/tmux/cmd-copy-mode.c
+++ b/usr.bin/tmux/cmd-copy-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-copy-mode.c,v 1.5 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.6 2009/08/18 16:21:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -28,7 +28,7 @@ int cmd_copy_mode_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_copy_mode_entry = {
"copy-mode", NULL,
- "[-u] " CMD_TARGET_WINDOW_USAGE,
+ "[-u] " CMD_TARGET_PANE_USAGE,
0, CMD_CHFLAG('u'),
cmd_target_init,
cmd_target_parse,
@@ -41,12 +41,10 @@ int
cmd_copy_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
- struct winlink *wl;
struct window_pane *wp;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- wp = wl->window->active;
window_pane_set_mode(wp, &window_copy_mode);
if (wp->mode == &window_copy_mode && data->chflags & CMD_CHFLAG('u'))
diff --git a/usr.bin/tmux/cmd-scroll-mode.c b/usr.bin/tmux/cmd-scroll-mode.c
index a9f7906c762..cd5f528470f 100644
--- a/usr.bin/tmux/cmd-scroll-mode.c
+++ b/usr.bin/tmux/cmd-scroll-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-scroll-mode.c,v 1.5 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: cmd-scroll-mode.c,v 1.6 2009/08/18 16:21:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -29,7 +29,7 @@ int cmd_scroll_mode_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_scroll_mode_entry = {
"scroll-mode", NULL,
- "[-u] " CMD_TARGET_WINDOW_USAGE,
+ "[-u] " CMD_TARGET_PANE_USAGE,
0, CMD_CHFLAG('u'),
cmd_scroll_mode_init,
cmd_target_parse,
@@ -57,12 +57,10 @@ int
cmd_scroll_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
- struct winlink *wl;
struct window_pane *wp;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- wp = wl->window->active;
window_pane_set_mode(wp, &window_scroll_mode);
if (wp->mode == &window_scroll_mode && data->chflags & CMD_CHFLAG('u'))
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c
index 55eb22b0510..c0acc8a779b 100644
--- a/usr.bin/tmux/cmd-send-keys.c
+++ b/usr.bin/tmux/cmd-send-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-send-keys.c,v 1.3 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.4 2009/08/18 16:21:04 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -40,7 +40,7 @@ struct cmd_send_keys_data {
const struct cmd_entry cmd_send_keys_entry = {
"send-keys", "send",
- "[-t target-window] key ...",
+ "[-t target-pane] key ...",
0, 0,
NULL,
cmd_send_keys_parse,
@@ -106,19 +106,17 @@ int
cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_send_keys_data *data = self->data;
- struct winlink *wl;
+ struct window_pane *wp;
u_int i;
if (data == NULL)
return (-1);
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- for (i = 0; i < data->nkeys; i++) {
- window_pane_key(
- wl->window->active, ctx->curclient, data->keys[i]);
- }
+ for (i = 0; i < data->nkeys; i++)
+ window_pane_key(wp, ctx->curclient, data->keys[i]);
return (0);
}
diff --git a/usr.bin/tmux/cmd-send-prefix.c b/usr.bin/tmux/cmd-send-prefix.c
index 0bb750ff094..e5bd7754522 100644
--- a/usr.bin/tmux/cmd-send-prefix.c
+++ b/usr.bin/tmux/cmd-send-prefix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-send-prefix.c,v 1.3 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: cmd-send-prefix.c,v 1.4 2009/08/18 16:21:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -28,7 +28,7 @@ int cmd_send_prefix_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_send_prefix_entry = {
"send-prefix", NULL,
- CMD_TARGET_WINDOW_USAGE,
+ CMD_TARGET_PANE_USAGE,
0, 0,
cmd_target_init,
cmd_target_parse,
@@ -42,14 +42,14 @@ cmd_send_prefix_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
struct session *s;
- struct winlink *wl;
+ struct window_pane *wp;
int key;
- if ((wl = cmd_find_window(ctx, data->target, &s)) == NULL)
+ if (cmd_find_pane(ctx, data->target, &s, &wp) == NULL)
return (-1);
key = options_get_number(&s->options, "prefix");
- window_pane_key(wl->window->active, ctx->curclient, key);
+ window_pane_key(wp, ctx->curclient, key);
return (0);
}
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 3eac3f547d6..a6882bd2812 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.71 2009/08/18 07:23:43 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.72 2009/08/18 16:21:04 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -528,7 +528,7 @@ The mode commands are as follows:
.Bl -tag -width Ds
.It Xo Ic copy-mode
.Op Fl u
-.Op Fl t Ar target-window
+.Op Fl t Ar target-pane
.Xc
Enter copy mode.
The
@@ -536,7 +536,7 @@ The
option scrolls one page up.
.It Xo Ic scroll-mode
.Op Fl u
-.Op Fl t Ar target-window
+.Op Fl t Ar target-pane
.Xc
Enter scroll mode.
The
@@ -970,7 +970,7 @@ are listed; this may be one of:
or
.Em emacs-copy .
.It Xo Ic send-keys
-.Op Fl t Ar target-window
+.Op Fl t Ar target-pane
.Ar key Ar ...
.Xc
.D1 (alias: Ic send )
@@ -984,7 +984,7 @@ or
) to send; if the string is not recognised as a key, it is sent as a series of
characters.
All arguments are sent sequentially from first to last.
-.It Ic send-prefix Op Fl t Ar target-window
+.It Ic send-prefix Op Fl t Ar target-pane
Send the prefix key to a window as if it was pressed.
.It Xo Ic unbind-key
.Op Fl cn
@@ -1799,7 +1799,7 @@ Display the contents of the specified buffer.
.Pp
Miscellaneous commands are as follows:
.Bl -tag -width Ds
-.It Ic clock-mode Op Fl t Ar target-window
+.It Ic clock-mode Op Fl t Ar target-pane
Display a large clock.
.It Ic if-shell Ar shell-command command
.D1 (alias: Ic if )