mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Take account of window-status-separator when checking window position,
based on diff from Balazs Kezes.
This commit is contained in:
		
							
								
								
									
										7
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								status.c
									
									
									
									
									
								
							@@ -121,12 +121,17 @@ status_set_window_at(struct client *c, u_int x)
 | 
			
		||||
{
 | 
			
		||||
	struct session	*s = c->session;
 | 
			
		||||
	struct winlink	*wl;
 | 
			
		||||
	struct options	*oo;
 | 
			
		||||
	size_t		 len;
 | 
			
		||||
 | 
			
		||||
	x += c->wlmouse;
 | 
			
		||||
	RB_FOREACH(wl, winlinks, &s->windows) {
 | 
			
		||||
		oo = &wl->window->options;
 | 
			
		||||
 | 
			
		||||
		len = strlen(options_get_string(oo, "window-status-separator"));
 | 
			
		||||
		if (x < wl->status_width && session_select(s, wl->idx) == 0)
 | 
			
		||||
			server_redraw_session(s);
 | 
			
		||||
		x -= wl->status_width + 1;
 | 
			
		||||
		x -= wl->status_width + len;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user