mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add M-+ and M-- to expand and collapse all items in tree mode.
This commit is contained in:
		
							
								
								
									
										12
									
								
								mode-tree.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								mode-tree.c
									
									
									
									
									
								
							@@ -887,7 +887,7 @@ mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,
 | 
			
		||||
    struct mouse_event *m, u_int *xp, u_int *yp)
 | 
			
		||||
{
 | 
			
		||||
	struct mode_tree_line	*line;
 | 
			
		||||
	struct mode_tree_item	*current, *parent;
 | 
			
		||||
	struct mode_tree_item	*current, *parent, *mti;
 | 
			
		||||
	u_int			 i, x, y;
 | 
			
		||||
	int			 choice;
 | 
			
		||||
	key_code		 tmp;
 | 
			
		||||
@@ -1058,6 +1058,16 @@ mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,
 | 
			
		||||
			mode_tree_build(mtd);
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
	case '-'|KEYC_ESCAPE:
 | 
			
		||||
		TAILQ_FOREACH(mti, &mtd->children, entry)
 | 
			
		||||
			mti->expanded = 0;
 | 
			
		||||
		mode_tree_build(mtd);
 | 
			
		||||
		break;
 | 
			
		||||
	case '+'|KEYC_ESCAPE:
 | 
			
		||||
		TAILQ_FOREACH(mti, &mtd->children, entry)
 | 
			
		||||
			mti->expanded = 1;
 | 
			
		||||
		mode_tree_build(mtd);
 | 
			
		||||
		break;
 | 
			
		||||
	case '?':
 | 
			
		||||
	case '/':
 | 
			
		||||
	case '\023': /* C-s */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user