mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Support ! for last pane.
This commit is contained in:
		
							
								
								
									
										8
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								cmd.c
									
									
									
									
									
								
							@@ -1192,7 +1192,13 @@ cmd_find_pane(struct cmd_q *cmdq,
 | 
			
		||||
		*wpp = wl->window->active;
 | 
			
		||||
	else if (paneptr[0] == '+' || paneptr[0] == '-')
 | 
			
		||||
		*wpp = cmd_find_pane_offset(paneptr, wl);
 | 
			
		||||
	else {
 | 
			
		||||
	else if (paneptr[0] == '!' && paneptr[1] == '\0') {
 | 
			
		||||
		if (wl->window->last == NULL) {
 | 
			
		||||
			cmdq_error(cmdq, "no last pane");
 | 
			
		||||
			goto error;
 | 
			
		||||
		}
 | 
			
		||||
		*wpp = wl->window->last;
 | 
			
		||||
	} else {
 | 
			
		||||
		idx = strtonum(paneptr, 0, INT_MAX, &errstr);
 | 
			
		||||
		if (errstr != NULL)
 | 
			
		||||
			goto lookup_string;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user