summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alerts.c6
-rw-r--r--cmd-find.c5
-rw-r--r--cmd-new-window.c2
-rw-r--r--notify.c6
-rw-r--r--tmux.h4
5 files changed, 11 insertions, 12 deletions
diff --git a/alerts.c b/alerts.c
index 43108ed4..708a24e2 100644
--- a/alerts.c
+++ b/alerts.c
@@ -178,7 +178,7 @@ alerts_check_bell(struct window *w)
s = wl->session;
if (s->curw != wl) {
wl->flags |= WINLINK_BELL;
- notify_winlink("alert-bell", s, wl);
+ notify_winlink("alert-bell", wl);
}
if (s->flags & SESSION_ALERTED)
@@ -239,7 +239,7 @@ alerts_check_activity(struct window *w)
continue;
wl->flags |= WINLINK_ACTIVITY;
- notify_winlink("alert-activity", s, wl);
+ notify_winlink("alert-activity", wl);
if (s->flags & SESSION_ALERTED)
continue;
@@ -275,7 +275,7 @@ alerts_check_silence(struct window *w)
if (s->curw == wl)
continue;
wl->flags |= WINLINK_SILENCE;
- notify_winlink("alert-silence", s, wl);
+ notify_winlink("alert-silence", wl);
if (s->flags & SESSION_ALERTED)
continue;
diff --git a/cmd-find.c b/cmd-find.c
index ae1ee835..68c15f15 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -895,12 +895,11 @@ cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
/* Find state from a winlink. */
int
-cmd_find_from_winlink(struct cmd_find_state *fs, struct session *s,
- struct winlink *wl)
+cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
{
cmd_find_clear_state(fs, NULL, 0);
- fs->s = s;
+ fs->s = wl->session;
fs->wl = wl;
fs->w = wl->window;
fs->wp = wl->window->active;
diff --git a/cmd-new-window.c b/cmd-new-window.c
index c10a4aaf..e99a8089 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -147,7 +147,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
if (to_free != NULL)
free((void *)to_free);
- cmd_find_from_winlink(&fs, s, wl);
+ cmd_find_from_winlink(&fs, wl);
hooks_insert(s->hooks, item, &fs, "after-new-window");
return (CMD_RETURN_NORMAL);
diff --git a/notify.c b/notify.c
index bf984211..446e71e7 100644
--- a/notify.c
+++ b/notify.c
@@ -184,12 +184,12 @@ notify_session(const char *name, struct session *s)
}
void
-notify_winlink(const char *name, struct session *s, struct winlink *wl)
+notify_winlink(const char *name, struct winlink *wl)
{
struct cmd_find_state fs;
- cmd_find_from_winlink(&fs, s, wl);
- notify_add(name, &fs, NULL, s, wl->window, NULL);
+ cmd_find_from_winlink(&fs, wl);
+ notify_add(name, &fs, NULL, wl->session, wl->window, NULL);
}
void
diff --git a/tmux.h b/tmux.h
index 382efb40..5b33b497 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1563,7 +1563,7 @@ void printflike(4, 5) hooks_insert(struct hooks *, struct cmdq_item *,
void notify_input(struct window_pane *, struct evbuffer *);
void notify_client(const char *, struct client *);
void notify_session(const char *, struct session *);
-void notify_winlink(const char *, struct session *, struct winlink *);
+void notify_winlink(const char *, struct winlink *);
void notify_session_window(const char *, struct session *, struct window *);
void notify_window(const char *, struct window *);
void notify_pane(const char *, struct window_pane *);
@@ -1747,7 +1747,7 @@ void cmd_find_log_state(const char *, struct cmd_find_state *);
int cmd_find_from_session(struct cmd_find_state *,
struct session *);
int cmd_find_from_winlink(struct cmd_find_state *,
- struct session *, struct winlink *);
+ struct winlink *);
int cmd_find_from_session_window(struct cmd_find_state *,
struct session *, struct window *);
int cmd_find_from_window(struct cmd_find_state *, struct window *);