mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Sync OpenBSD patchset 615:
When a window is destroyed, remove all links to it from each session rather than just the first. Reported by Robin Lee Powell.
This commit is contained in:
		
							
								
								
									
										16
									
								
								server-fn.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								server-fn.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: server-fn.c,v 1.101 2010-01-05 23:52:37 tcunha Exp $ */
 | 
					/* $Id: server-fn.c,v 1.102 2010-01-25 17:13:43 tcunha Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -260,13 +260,13 @@ server_kill_window(struct window *w)
 | 
				
			|||||||
		s = ARRAY_ITEM(&sessions, i);
 | 
							s = ARRAY_ITEM(&sessions, i);
 | 
				
			||||||
		if (s == NULL || !session_has(s, w))
 | 
							if (s == NULL || !session_has(s, w))
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		if ((wl = winlink_find_by_window(&s->windows, w)) == NULL)
 | 
							while ((wl = winlink_find_by_window(&s->windows, w)) != NULL) {
 | 
				
			||||||
			continue;
 | 
								if (session_detach(s, wl)) {
 | 
				
			||||||
 | 
									server_destroy_session_group(s);
 | 
				
			||||||
		if (session_detach(s, wl))
 | 
									break;
 | 
				
			||||||
			server_destroy_session_group(s);
 | 
								} else
 | 
				
			||||||
		else
 | 
									server_redraw_session_group(s);
 | 
				
			||||||
			server_redraw_session_group(s);
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user