aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-05-23 19:42:19 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-05-23 19:42:19 +0000
commit4f5c5b37b866967be189901bc140ca6b8c25c5e3 (patch)
treeea5b685be2f69f30fc18872caefc0024e2574c7a /window.c
parent0ed727a0128dd84ae727a337208a31df8f3cff02 (diff)
downloadrtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.tar.gz
rtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.tar.bz2
rtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.zip
Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway. This allows send-key to work properly for manipulating copy mode from outside tmux. From Micah Cowan.
Diffstat (limited to 'window.c')
-rw-r--r--window.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/window.c b/window.c
index 0811a4cb..36ad4adb 100644
--- a/window.c
+++ b/window.c
@@ -721,7 +721,7 @@ window_pane_reset_mode(struct window_pane *wp)
}
void
-window_pane_key(struct window_pane *wp, struct client *c, int key)
+window_pane_key(struct window_pane *wp, struct session *sess, int key)
{
struct window_pane *wp2;
@@ -730,7 +730,7 @@ window_pane_key(struct window_pane *wp, struct client *c, int key)
if (wp->mode != NULL) {
if (wp->mode->key != NULL)
- wp->mode->key(wp, c, key);
+ wp->mode->key(wp, sess, key);
return;
}
@@ -749,7 +749,7 @@ window_pane_key(struct window_pane *wp, struct client *c, int key)
void
window_pane_mouse(
- struct window_pane *wp, struct client *c, struct mouse_event *m)
+ struct window_pane *wp, struct session *sess, struct mouse_event *m)
{
if (!window_pane_visible(wp))
return;
@@ -763,7 +763,7 @@ window_pane_mouse(
if (wp->mode != NULL) {
if (wp->mode->mouse != NULL)
- wp->mode->mouse(wp, c, m);
+ wp->mode->mouse(wp, sess, m);
} else if (wp->fd != -1)
input_mouse(wp, m);
}