mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	While the display-panes indicator is on screen, make the number keys select the
pane with that index.
This commit is contained in:
		
							
								
								
									
										13
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								server.c
									
									
									
									
									
								
							@@ -795,6 +795,7 @@ server_accept_client(int srv_fd)
 | 
			
		||||
void
 | 
			
		||||
server_handle_client(struct client *c)
 | 
			
		||||
{
 | 
			
		||||
	struct window		*w;
 | 
			
		||||
	struct window_pane	*wp;
 | 
			
		||||
	struct screen		*s;
 | 
			
		||||
	struct timeval	 	 tv;
 | 
			
		||||
@@ -818,7 +819,17 @@ server_handle_client(struct client *c)
 | 
			
		||||
 | 
			
		||||
		if (c->session == NULL)
 | 
			
		||||
			return;
 | 
			
		||||
		wp = c->session->curw->window->active;	/* could die */
 | 
			
		||||
		w = c->session->curw->window;
 | 
			
		||||
		wp = w->active;	/* could die */
 | 
			
		||||
 | 
			
		||||
		/* Special case: number keys jump to pane in identify mode. */
 | 
			
		||||
		if (c->flags & CLIENT_IDENTIFY && key >= '0' && key <= '9') {	
 | 
			
		||||
			wp = window_pane_at_index(w, key - '0');
 | 
			
		||||
			if (wp != NULL && window_pane_visible(wp))
 | 
			
		||||
				window_set_active_pane(w, wp);
 | 
			
		||||
			server_clear_identify(c);
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		status_message_clear(c);
 | 
			
		||||
		server_clear_identify(c);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user