mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Sync OpenBSD patchset 412:
The pane pty name isn't useful for anything so show the pane number instead.
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: cmd-list-panes.c,v 1.1 2009-10-12 00:08:12 tcunha Exp $ */
 | 
					/* $Id: cmd-list-panes.c,v 1.2 2009-10-15 20:10:28 tcunha Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -47,13 +47,13 @@ cmd_list_panes_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
				
			|||||||
	struct window_pane	*wp;
 | 
						struct window_pane	*wp;
 | 
				
			||||||
	struct grid		*gd;
 | 
						struct grid		*gd;
 | 
				
			||||||
	struct grid_line	*gl;
 | 
						struct grid_line	*gl;
 | 
				
			||||||
	u_int			 i;
 | 
						u_int			 i, n;
 | 
				
			||||||
	unsigned long long	 size;
 | 
						unsigned long long	 size;
 | 
				
			||||||
	const char		*name;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
 | 
						if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
 | 
				
			||||||
		return (-1);
 | 
							return (-1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						n = 0;
 | 
				
			||||||
	TAILQ_FOREACH(wp, &wl->window->panes, entry) {
 | 
						TAILQ_FOREACH(wp, &wl->window->panes, entry) {
 | 
				
			||||||
		gd = wp->base.grid;
 | 
							gd = wp->base.grid;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
@@ -65,13 +65,9 @@ cmd_list_panes_exec(struct cmd *self, struct cmd_ctx *ctx)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		size += gd->hsize * sizeof *gd->linedata;
 | 
							size += gd->hsize * sizeof *gd->linedata;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		name = NULL;
 | 
							ctx->print(ctx, "%u: [%ux%u] [history %u/%u, %llu bytes]",
 | 
				
			||||||
		if (wp->fd != -1)
 | 
							    n, wp->sx, wp->sy, gd->hsize, gd->hlimit, size);
 | 
				
			||||||
			name = ttyname(wp->fd);
 | 
							n++;
 | 
				
			||||||
		if (name == NULL)
 | 
					 | 
				
			||||||
			name = "unknown";
 | 
					 | 
				
			||||||
		ctx->print(ctx, "%s [%ux%u] [history %u/%u, %llu bytes]",
 | 
					 | 
				
			||||||
		    name, wp->sx, wp->sy, gd->hsize, gd->hlimit, size);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (0);
 | 
						return (0);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user