mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	More unnecessary arguments now winlink points back to session.
This commit is contained in:
		
							
								
								
									
										6
									
								
								alerts.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								alerts.c
									
									
									
									
									
								
							@@ -178,7 +178,7 @@ alerts_check_bell(struct window *w)
 | 
				
			|||||||
		s = wl->session;
 | 
							s = wl->session;
 | 
				
			||||||
		if (s->curw != wl) {
 | 
							if (s->curw != wl) {
 | 
				
			||||||
			wl->flags |= WINLINK_BELL;
 | 
								wl->flags |= WINLINK_BELL;
 | 
				
			||||||
			notify_winlink("alert-bell", s, wl);
 | 
								notify_winlink("alert-bell", wl);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (s->flags & SESSION_ALERTED)
 | 
							if (s->flags & SESSION_ALERTED)
 | 
				
			||||||
@@ -239,7 +239,7 @@ alerts_check_activity(struct window *w)
 | 
				
			|||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		wl->flags |= WINLINK_ACTIVITY;
 | 
							wl->flags |= WINLINK_ACTIVITY;
 | 
				
			||||||
		notify_winlink("alert-activity", s, wl);
 | 
							notify_winlink("alert-activity", wl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (s->flags & SESSION_ALERTED)
 | 
							if (s->flags & SESSION_ALERTED)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
@@ -275,7 +275,7 @@ alerts_check_silence(struct window *w)
 | 
				
			|||||||
		if (s->curw == wl)
 | 
							if (s->curw == wl)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		wl->flags |= WINLINK_SILENCE;
 | 
							wl->flags |= WINLINK_SILENCE;
 | 
				
			||||||
		notify_winlink("alert-silence", s, wl);
 | 
							notify_winlink("alert-silence", wl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (s->flags & SESSION_ALERTED)
 | 
							if (s->flags & SESSION_ALERTED)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -895,12 +895,11 @@ cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* Find state from a winlink. */
 | 
					/* Find state from a winlink. */
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
cmd_find_from_winlink(struct cmd_find_state *fs, struct session *s,
 | 
					cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
 | 
				
			||||||
    struct winlink *wl)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	cmd_find_clear_state(fs, NULL, 0);
 | 
						cmd_find_clear_state(fs, NULL, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fs->s = s;
 | 
						fs->s = wl->session;
 | 
				
			||||||
	fs->wl = wl;
 | 
						fs->wl = wl;
 | 
				
			||||||
	fs->w = wl->window;
 | 
						fs->w = wl->window;
 | 
				
			||||||
	fs->wp = wl->window->active;
 | 
						fs->wp = wl->window->active;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -147,7 +147,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
 | 
				
			|||||||
	if (to_free != NULL)
 | 
						if (to_free != NULL)
 | 
				
			||||||
		free((void *)to_free);
 | 
							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");
 | 
						hooks_insert(s->hooks, item, &fs, "after-new-window");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (CMD_RETURN_NORMAL);
 | 
						return (CMD_RETURN_NORMAL);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								notify.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								notify.c
									
									
									
									
									
								
							@@ -184,12 +184,12 @@ notify_session(const char *name, struct session *s)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					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;
 | 
						struct cmd_find_state	fs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cmd_find_from_winlink(&fs, s, wl);
 | 
						cmd_find_from_winlink(&fs, wl);
 | 
				
			||||||
	notify_add(name, &fs, NULL, s, wl->window, NULL);
 | 
						notify_add(name, &fs, NULL, wl->session, wl->window, NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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_input(struct window_pane *, struct evbuffer *);
 | 
				
			||||||
void	notify_client(const char *, struct client *);
 | 
					void	notify_client(const char *, struct client *);
 | 
				
			||||||
void	notify_session(const char *, struct session *);
 | 
					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_session_window(const char *, struct session *, struct window *);
 | 
				
			||||||
void	notify_window(const char *, struct window *);
 | 
					void	notify_window(const char *, struct window *);
 | 
				
			||||||
void	notify_pane(const char *, struct window_pane *);
 | 
					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 *,
 | 
					int		 cmd_find_from_session(struct cmd_find_state *,
 | 
				
			||||||
		     struct session *);
 | 
							     struct session *);
 | 
				
			||||||
int		 cmd_find_from_winlink(struct cmd_find_state *,
 | 
					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 *,
 | 
					int		 cmd_find_from_session_window(struct cmd_find_state *,
 | 
				
			||||||
		     struct session *, struct window *);
 | 
							     struct session *, struct window *);
 | 
				
			||||||
int		 cmd_find_from_window(struct cmd_find_state *, struct window *);
 | 
					int		 cmd_find_from_window(struct cmd_find_state *, struct window *);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user