mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Move offset of window list into status struct.
This commit is contained in:
		
							
								
								
									
										4
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								status.c
									
									
									
									
									
								
							@@ -284,7 +284,7 @@ status_get_window_at(struct client *c, u_int x)
 | 
				
			|||||||
	const char	*sep;
 | 
						const char	*sep;
 | 
				
			||||||
	size_t		 seplen;
 | 
						size_t		 seplen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	x += c->wlmouse;
 | 
						x += c->status.window_list_offset;
 | 
				
			||||||
	RB_FOREACH(wl, winlinks, &s->windows) {
 | 
						RB_FOREACH(wl, winlinks, &s->windows) {
 | 
				
			||||||
		oo = wl->window->options;
 | 
							oo = wl->window->options;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -506,7 +506,7 @@ draw:
 | 
				
			|||||||
		wloffset++;
 | 
							wloffset++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Copy the window list. */
 | 
						/* Copy the window list. */
 | 
				
			||||||
	c->wlmouse = -wloffset + wlstart;
 | 
						c->status.window_list_offset = -wloffset + wlstart;
 | 
				
			||||||
	screen_write_cursormove(&ctx, wloffset, 0);
 | 
						screen_write_cursormove(&ctx, wloffset, 0);
 | 
				
			||||||
	screen_write_fast_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1);
 | 
						screen_write_fast_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1);
 | 
				
			||||||
	screen_free(&window_list);
 | 
						screen_free(&window_list);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1278,8 +1278,11 @@ struct cmd_entry {
 | 
				
			|||||||
/* Status line. */
 | 
					/* Status line. */
 | 
				
			||||||
struct status_line {
 | 
					struct status_line {
 | 
				
			||||||
	struct event	 timer;
 | 
						struct event	 timer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct screen	 status;
 | 
						struct screen	 status;
 | 
				
			||||||
	struct screen	*old_status;
 | 
						struct screen	*old_status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int		 window_list_offset;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Client connection. */
 | 
					/* Client connection. */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user