mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Only include pane status in minimum size if it is turned on, GitHub
issue 1480.
This commit is contained in:
		
							
								
								
									
										9
									
								
								layout.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								layout.c
									
									
									
									
									
								
							@@ -236,7 +236,7 @@ layout_need_status(struct layout_cell *lc, int at_top)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	struct layout_cell	*first_lc;
 | 
						struct layout_cell	*first_lc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (lc->parent) {
 | 
						if (lc->parent != NULL) {
 | 
				
			||||||
		if (lc->parent->type == LAYOUT_LEFTRIGHT)
 | 
							if (lc->parent->type == LAYOUT_LEFTRIGHT)
 | 
				
			||||||
			return (layout_need_status(lc->parent, at_top));
 | 
								return (layout_need_status(lc->parent, at_top));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -349,7 +349,9 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	struct layout_cell	*lcchild;
 | 
						struct layout_cell	*lcchild;
 | 
				
			||||||
	u_int			 available, minimum;
 | 
						u_int			 available, minimum;
 | 
				
			||||||
 | 
						int			 status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						status = options_get_number(w->options, "pane-border-status");
 | 
				
			||||||
	if (lc->type == LAYOUT_WINDOWPANE) {
 | 
						if (lc->type == LAYOUT_WINDOWPANE) {
 | 
				
			||||||
		/* Space available in this cell only. */
 | 
							/* Space available in this cell only. */
 | 
				
			||||||
		minimum = PANE_MINIMUM;
 | 
							minimum = PANE_MINIMUM;
 | 
				
			||||||
@@ -357,9 +359,8 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
 | 
				
			|||||||
			available = lc->sx;
 | 
								available = lc->sx;
 | 
				
			||||||
		else {
 | 
							else {
 | 
				
			||||||
			available = lc->sy;
 | 
								available = lc->sy;
 | 
				
			||||||
			minimum += layout_need_status(lc,
 | 
								if (status != 0)
 | 
				
			||||||
			    options_get_number(w->options,
 | 
									minimum += layout_need_status(lc, status == 1);
 | 
				
			||||||
			    "pane-border-status") == 1);
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (available > minimum)
 | 
							if (available > minimum)
 | 
				
			||||||
			available -= minimum;
 | 
								available -= minimum;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user