mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -344,8 +344,8 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Update status line and change flags if unchanged. */
 | 
					/* Update status line and change flags if unchanged. */
 | 
				
			||||||
static void
 | 
					static int
 | 
				
			||||||
screen_redraw_update(struct client *c)
 | 
					screen_redraw_update(struct client *c, int flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct window		*w = c->session->curw->window;
 | 
						struct window		*w = c->session->curw->window;
 | 
				
			||||||
	struct window_pane	*wp;
 | 
						struct window_pane	*wp;
 | 
				
			||||||
@@ -358,8 +358,8 @@ screen_redraw_update(struct client *c)
 | 
				
			|||||||
		redraw = status_prompt_redraw(c);
 | 
							redraw = status_prompt_redraw(c);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		redraw = status_redraw(c);
 | 
							redraw = status_redraw(c);
 | 
				
			||||||
	if (!redraw)
 | 
						if (!redraw && (~flags & CLIENT_REDRAWSTATUSALWAYS))
 | 
				
			||||||
		c->flags &= ~CLIENT_REDRAWSTATUS;
 | 
							flags &= ~CLIENT_REDRAWSTATUS;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (options_get_number(wo, "pane-border-status") != CELL_STATUS_OFF) {
 | 
						if (options_get_number(wo, "pane-border-status") != CELL_STATUS_OFF) {
 | 
				
			||||||
		redraw = 0;
 | 
							redraw = 0;
 | 
				
			||||||
@@ -368,8 +368,9 @@ screen_redraw_update(struct client *c)
 | 
				
			|||||||
				redraw = 1;
 | 
									redraw = 1;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (redraw)
 | 
							if (redraw)
 | 
				
			||||||
			c->flags |= CLIENT_REDRAWBORDERS;
 | 
								flags |= CLIENT_REDRAWBORDERS;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						return (flags);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Set up redraw context. */
 | 
					/* Set up redraw context. */
 | 
				
			||||||
@@ -398,21 +399,23 @@ void
 | 
				
			|||||||
screen_redraw_screen(struct client *c)
 | 
					screen_redraw_screen(struct client *c)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct screen_redraw_ctx	ctx;
 | 
						struct screen_redraw_ctx	ctx;
 | 
				
			||||||
 | 
						int				flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->flags & CLIENT_SUSPENDED)
 | 
						if (c->flags & CLIENT_SUSPENDED)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	screen_redraw_update(c);
 | 
						flags = screen_redraw_update(c, c->flags);
 | 
				
			||||||
	screen_redraw_set_context(c, &ctx);
 | 
						screen_redraw_set_context(c, &ctx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) {
 | 
						if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) {
 | 
				
			||||||
		if (ctx.pane_status != CELL_STATUS_OFF)
 | 
							if (ctx.pane_status != CELL_STATUS_OFF)
 | 
				
			||||||
			screen_redraw_draw_pane_status(&ctx);
 | 
								screen_redraw_draw_pane_status(&ctx);
 | 
				
			||||||
		screen_redraw_draw_borders(&ctx);
 | 
							screen_redraw_draw_borders(&ctx);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (c->flags & CLIENT_REDRAWWINDOW)
 | 
						if (flags & CLIENT_REDRAWWINDOW)
 | 
				
			||||||
		screen_redraw_draw_panes(&ctx);
 | 
							screen_redraw_draw_panes(&ctx);
 | 
				
			||||||
	if (ctx.lines != 0 && (c->flags & CLIENT_REDRAWSTATUS))
 | 
						if (ctx.lines != 0 &&
 | 
				
			||||||
 | 
						    (flags & (CLIENT_REDRAWSTATUS|CLIENT_REDRAWSTATUSALWAYS)))
 | 
				
			||||||
		screen_redraw_draw_status(&ctx);
 | 
							screen_redraw_draw_status(&ctx);
 | 
				
			||||||
	tty_reset(&c->tty);
 | 
						tty_reset(&c->tty);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1329,6 +1329,12 @@ server_client_check_redraw(struct client *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
 | 
						if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
						if (c->flags & CLIENT_ALLREDRAWFLAGS) {
 | 
				
			||||||
 | 
							log_debug("%s: redraw%s%s%s", c->name,
 | 
				
			||||||
 | 
							    (c->flags & CLIENT_REDRAWWINDOW) ? " window" : "",
 | 
				
			||||||
 | 
							    (c->flags & CLIENT_REDRAWSTATUS) ? " status" : "",
 | 
				
			||||||
 | 
							    (c->flags & CLIENT_REDRAWBORDERS) ? " borders" : "");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * If there is outstanding data, defer the redraw until it has been
 | 
						 * If there is outstanding data, defer the redraw until it has been
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1354,8 +1354,12 @@ struct client {
 | 
				
			|||||||
#define CLIENT_TRIPLECLICK 0x200000
 | 
					#define CLIENT_TRIPLECLICK 0x200000
 | 
				
			||||||
#define CLIENT_SIZECHANGED 0x400000
 | 
					#define CLIENT_SIZECHANGED 0x400000
 | 
				
			||||||
#define CLIENT_STATUSOFF 0x800000
 | 
					#define CLIENT_STATUSOFF 0x800000
 | 
				
			||||||
 | 
					#define CLIENT_REDRAWSTATUSALWAYS 0x1000000
 | 
				
			||||||
#define CLIENT_ALLREDRAWFLAGS \
 | 
					#define CLIENT_ALLREDRAWFLAGS \
 | 
				
			||||||
	(CLIENT_REDRAWWINDOW|CLIENT_REDRAWSTATUS|CLIENT_REDRAWBORDERS)
 | 
						(CLIENT_REDRAWWINDOW| \
 | 
				
			||||||
 | 
						 CLIENT_REDRAWSTATUS| \
 | 
				
			||||||
 | 
						 CLIENT_REDRAWSTATUSALWAYS| \
 | 
				
			||||||
 | 
						 CLIENT_REDRAWBORDERS)
 | 
				
			||||||
	int		 flags;
 | 
						int		 flags;
 | 
				
			||||||
	struct key_table *keytable;
 | 
						struct key_table *keytable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user