mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Do not allow disabled items to be selected.
This commit is contained in:
		
							
								
								
									
										7
									
								
								menu.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								menu.c
									
									
									
									
									
								
							@@ -315,10 +315,11 @@ chosen:
 | 
			
		||||
	if (md->choice == -1)
 | 
			
		||||
		return (1);
 | 
			
		||||
	item = &menu->items[md->choice];
 | 
			
		||||
	if ((md->flags & MENU_STAYOPEN) && item->name == NULL)
 | 
			
		||||
		return (0);
 | 
			
		||||
	if (item->name == NULL || *item->name == '-')
 | 
			
		||||
	if (item->name == NULL || *item->name == '-') {
 | 
			
		||||
		if (md->flags & MENU_STAYOPEN)
 | 
			
		||||
			return (0);
 | 
			
		||||
		return (1);
 | 
			
		||||
	}
 | 
			
		||||
	if (md->cb != NULL) {
 | 
			
		||||
	    md->cb(md->menu, md->choice, item->key, md->data);
 | 
			
		||||
	    md->cb = NULL;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user