mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Only redraw pane when it has actually changed.
This commit is contained in:
		@@ -99,8 +99,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq)
 | 
			
		||||
		wp->flags &= ~PANE_INPUTOFF;
 | 
			
		||||
	else if (args_has(self->args, 'd'))
 | 
			
		||||
		wp->flags |= PANE_INPUTOFF;
 | 
			
		||||
	else {
 | 
			
		||||
		window_set_active_pane(wl->window, wp);
 | 
			
		||||
	else if (window_set_active_pane(wl->window, wp)) {
 | 
			
		||||
		server_status_window(wl->window);
 | 
			
		||||
		server_redraw_window_borders(wl->window);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							@@ -2116,7 +2116,7 @@ void		 window_destroy(struct window *);
 | 
			
		||||
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
 | 
			
		||||
void		 window_set_active_at(struct window *, u_int, u_int);
 | 
			
		||||
struct window_pane *window_find_string(struct window *, const char *);
 | 
			
		||||
void		 window_set_active_pane(struct window *, struct window_pane *);
 | 
			
		||||
int		 window_set_active_pane(struct window *, struct window_pane *);
 | 
			
		||||
struct window_pane *window_add_pane(struct window *, u_int);
 | 
			
		||||
void		 window_resize(struct window *, u_int, u_int);
 | 
			
		||||
int		 window_zoom(struct window_pane *);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								window.c
									
									
									
									
									
								
							@@ -386,11 +386,11 @@ window_resize(struct window *w, u_int sx, u_int sy)
 | 
			
		||||
	w->sy = sy;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
int
 | 
			
		||||
window_set_active_pane(struct window *w, struct window_pane *wp)
 | 
			
		||||
{
 | 
			
		||||
	if (wp == w->active)
 | 
			
		||||
		return;
 | 
			
		||||
		return (0);
 | 
			
		||||
	w->last = w->active;
 | 
			
		||||
	w->active = wp;
 | 
			
		||||
	while (!window_pane_visible(w->active)) {
 | 
			
		||||
@@ -398,9 +398,10 @@ window_set_active_pane(struct window *w, struct window_pane *wp)
 | 
			
		||||
		if (w->active == NULL)
 | 
			
		||||
			w->active = TAILQ_LAST(&w->panes, window_panes);
 | 
			
		||||
		if (w->active == wp)
 | 
			
		||||
			return;
 | 
			
		||||
			return (1);
 | 
			
		||||
	}
 | 
			
		||||
	w->active->active_point = next_active_point++;
 | 
			
		||||
	return (1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct window_pane *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user