mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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.
This commit is contained in:
8
window.c
8
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user