mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -1322,6 +1322,16 @@ server_client_check_redraw(struct client *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	c->flags &= ~(CLIENT_REDRAW|CLIENT_BORDERS|CLIENT_STATUS|
 | 
						c->flags &= ~(CLIENT_REDRAW|CLIENT_BORDERS|CLIENT_STATUS|
 | 
				
			||||||
	    CLIENT_STATUSFORCE);
 | 
						    CLIENT_STATUSFORCE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (needed) {
 | 
				
			||||||
 | 
							/*
 | 
				
			||||||
 | 
							 * We would have deferred the redraw unless the output buffer
 | 
				
			||||||
 | 
							 * was empty, so we can record how many bytes the redraw
 | 
				
			||||||
 | 
							 * generated.
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							c->redraw = EVBUFFER_LENGTH(tty->out);
 | 
				
			||||||
 | 
							log_debug("%s: redraw added %zu bytes", c->name, c->redraw);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Set client title. */
 | 
					/* Set client title. */
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1310,6 +1310,7 @@ struct client {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	size_t		 written;
 | 
						size_t		 written;
 | 
				
			||||||
	size_t		 discarded;
 | 
						size_t		 discarded;
 | 
				
			||||||
 | 
						size_t		 redraw;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void		(*stdin_callback)(struct client *, int, void *);
 | 
						void		(*stdin_callback)(struct client *, int, void *);
 | 
				
			||||||
	void		*stdin_callback_data;
 | 
						void		*stdin_callback_data;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										11
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								tty.c
									
									
									
									
									
								
							@@ -233,7 +233,14 @@ tty_write_callback(__unused int fd, __unused short events, void *data)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	log_debug("%s: wrote %d bytes (of %zu)", c->name, nwrite, size);
 | 
						log_debug("%s: wrote %d bytes (of %zu)", c->name, nwrite, size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tty_block_maybe(tty))
 | 
						if (c->redraw > 0) {
 | 
				
			||||||
 | 
							if ((size_t)nwrite >= c->redraw)
 | 
				
			||||||
 | 
								c->redraw = 0;
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								c->redraw -= nwrite;
 | 
				
			||||||
 | 
							log_debug("%s: waiting for redraw, %zu bytes left", c->name,
 | 
				
			||||||
 | 
							    c->redraw);
 | 
				
			||||||
 | 
						} else if (tty_block_maybe(tty))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (EVBUFFER_LENGTH(tty->out) != 0)
 | 
						if (EVBUFFER_LENGTH(tty->out) != 0)
 | 
				
			||||||
@@ -488,7 +495,7 @@ tty_add(struct tty *tty, const char *buf, size_t len)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	evbuffer_add(tty->out, buf, len);
 | 
						evbuffer_add(tty->out, buf, len);
 | 
				
			||||||
	log_debug("%s: %.*s", c->name, (int)len, (const char *)buf);
 | 
						log_debug("%s: %.*s", c->name, (int)len, buf);
 | 
				
			||||||
	c->written += len;
 | 
						c->written += len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tty_log_fd != -1)
 | 
						if (tty_log_fd != -1)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user