From: nicm Date: Fri, 21 Apr 2017 14:09:44 +0000 (+0000) Subject: More unnecessary arguments now winlink points back to session. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6aa2e59a714148b61ec8e1b84f9f7485518623e4;p=openbsd More unnecessary arguments now winlink points back to session. --- diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c index 25f631a74e3..902cb45bfac 100644 --- a/usr.bin/tmux/alerts.c +++ b/usr.bin/tmux/alerts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alerts.c,v 1.16 2016/11/01 09:07:18 nicm Exp $ */ +/* $OpenBSD: alerts.c,v 1.17 2017/04/21 14:09:44 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -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/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c index 84e9756afa3..dafab9ac574 100644 --- a/usr.bin/tmux/cmd-find.c +++ b/usr.bin/tmux/cmd-find.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-find.c,v 1.45 2017/04/21 14:01:19 nicm Exp $ */ +/* $OpenBSD: cmd-find.c,v 1.46 2017/04/21 14:09:44 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -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/usr.bin/tmux/cmd-new-window.c b/usr.bin/tmux/cmd-new-window.c index c0bf3bbdbc5..fd6617436e4 100644 --- a/usr.bin/tmux/cmd-new-window.c +++ b/usr.bin/tmux/cmd-new-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-window.c,v 1.67 2017/03/08 13:36:12 nicm Exp $ */ +/* $OpenBSD: cmd-new-window.c,v 1.68 2017/04/21 14:09:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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/usr.bin/tmux/notify.c b/usr.bin/tmux/notify.c index 9c72b38f51f..f4ff445c015 100644 --- a/usr.bin/tmux/notify.c +++ b/usr.bin/tmux/notify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: notify.c,v 1.20 2017/01/11 14:56:44 nicm Exp $ */ +/* $OpenBSD: notify.c,v 1.21 2017/04/21 14:09:44 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman @@ -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/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 2c02e644613..70fdc5a751d 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.745 2017/04/21 14:01:19 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.746 2017/04/21 14:09:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 *);