mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Keep cursor on selected item on menu (useful for blind people), GitHub
issue 3225.
This commit is contained in:
		
							
								
								
									
										9
									
								
								menu.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								menu.c
									
									
									
									
									
								
							@@ -160,11 +160,16 @@ menu_free(struct menu *menu)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct screen *
 | 
					struct screen *
 | 
				
			||||||
menu_mode_cb(__unused struct client *c, void *data, __unused u_int *cx,
 | 
					menu_mode_cb(__unused struct client *c, void *data, u_int *cx, u_int *cy)
 | 
				
			||||||
    __unused u_int *cy)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct menu_data	*md = data;
 | 
						struct menu_data	*md = data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						*cx = md->px + 2;
 | 
				
			||||||
 | 
						if (md->choice == -1)
 | 
				
			||||||
 | 
							*cy = md->py;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							*cy = md->py + 1 + md->choice;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (&md->s);
 | 
						return (&md->s);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user