mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Basic horizontal splitting and layout management. Still some redraw and other
issues - particularly, don't mix with manual pane resizing and be careful when viewing from multiple clients; generally cycling the layout a few times will fix most problems. Getting this in for testing while I think about how to deal with manual mode. Split window as normal and cycle the layouts with C-b space. Some of the layouts will work better when swap-pane comes along.
This commit is contained in:
		
							
								
								
									
										9
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								window.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: window.c,v 1.70 2009-03-07 09:29:54 nicm Exp $ */
 | 
			
		||||
/* $Id: window.c,v 1.71 2009-04-01 18:21:42 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -212,6 +212,7 @@ window_create1(u_int sx, u_int sy)
 | 
			
		||||
 | 
			
		||||
	TAILQ_INIT(&w->panes);
 | 
			
		||||
	w->active = NULL;
 | 
			
		||||
	w->layout = 0;
 | 
			
		||||
 | 
			
		||||
	w->sx = sx;
 | 
			
		||||
	w->sy = sy;
 | 
			
		||||
@@ -375,6 +376,7 @@ window_update_panes(struct window *w)
 | 
			
		||||
	TAILQ_FOREACH(wp, &w->panes, entry) {
 | 
			
		||||
		if (wp->flags & PANE_HIDDEN)
 | 
			
		||||
			continue;
 | 
			
		||||
		wp->xoff = 0;
 | 
			
		||||
		wp->yoff = yoff;
 | 
			
		||||
		yoff += wp->sy + 1;
 | 
			
		||||
	}
 | 
			
		||||
@@ -512,11 +514,12 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
 | 
			
		||||
 | 
			
		||||
	wp->mode = NULL;
 | 
			
		||||
 | 
			
		||||
	wp->xoff = 0;
 | 
			
		||||
 	wp->yoff = 0;
 | 
			
		||||
 | 
			
		||||
	wp->sx = sx;
 | 
			
		||||
	wp->sy = sy;
 | 
			
		||||
 | 
			
		||||
 	wp->yoff = 0;
 | 
			
		||||
 | 
			
		||||
	screen_init(&wp->base, sx, sy, hlimit);
 | 
			
		||||
	wp->screen = &wp->base;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user