mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	Tidy up tty_write, from Sean Estabrooks.
This commit is contained in:
		
							
								
								
									
										13
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								tty.c
									
									
									
									
									
								
							@@ -667,7 +667,6 @@ tty_write(
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	struct window_pane	*wp = ctx->wp;
 | 
						struct window_pane	*wp = ctx->wp;
 | 
				
			||||||
	struct client		*c;
 | 
						struct client		*c;
 | 
				
			||||||
	struct session		*s;
 | 
					 | 
				
			||||||
	u_int		 	 i;
 | 
						u_int		 	 i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* wp can be NULL if updating the screen but not the terminal. */
 | 
						/* wp can be NULL if updating the screen but not the terminal. */
 | 
				
			||||||
@@ -681,16 +680,11 @@ tty_write(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
 | 
						for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
 | 
				
			||||||
		c = ARRAY_ITEM(&clients, i);
 | 
							c = ARRAY_ITEM(&clients, i);
 | 
				
			||||||
		if (c == NULL || c->session == NULL)
 | 
							if (c == NULL || c->session == NULL || c->tty.term == NULL)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		if (c->flags & CLIENT_SUSPENDED)
 | 
							if (c->flags & (CLIENT_SUSPENDED|TTY_FREEZE))
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		s = c->session;
 | 
							if (c->session->curw->window != wp->window)
 | 
				
			||||||
 | 
					 | 
				
			||||||
		if (s->curw->window == wp->window) {
 | 
					 | 
				
			||||||
			if (c->tty.term == NULL)
 | 
					 | 
				
			||||||
				continue;
 | 
					 | 
				
			||||||
			if (c->tty.flags & TTY_FREEZE)
 | 
					 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ctx->xoff = wp->xoff;
 | 
							ctx->xoff = wp->xoff;
 | 
				
			||||||
@@ -700,7 +694,6 @@ tty_write(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		cmdfn(&c->tty, ctx);
 | 
							cmdfn(&c->tty, ctx);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user