version 1.3, 2009/11/13 19:53:29 |
version 1.4, 2009/12/03 22:50:10 |
|
|
#include "tmux.h" |
#include "tmux.h" |
|
|
/* |
/* |
* List panes on given window.. |
* List panes on given window. |
*/ |
*/ |
|
|
int cmd_list_panes_exec(struct cmd *, struct cmd_ctx *); |
int cmd_list_panes_exec(struct cmd *, struct cmd_ctx *); |
|
|
n = 0; |
n = 0; |
TAILQ_FOREACH(wp, &wl->window->panes, entry) { |
TAILQ_FOREACH(wp, &wl->window->panes, entry) { |
gd = wp->base.grid; |
gd = wp->base.grid; |
|
|
size = 0; |
size = 0; |
for (i = 0; i < gd->hsize; i++) { |
for (i = 0; i < gd->hsize; i++) { |
gl = &gd->linedata[i]; |
gl = &gd->linedata[i]; |
|
|
size += gl->utf8size * sizeof *gl->utf8data; |
size += gl->utf8size * sizeof *gl->utf8data; |
} |
} |
size += gd->hsize * sizeof *gd->linedata; |
size += gd->hsize * sizeof *gd->linedata; |
|
|
ctx->print(ctx, "%u: [%ux%u] [history %u/%u, %llu bytes]", |
ctx->print(ctx, "%u: [%ux%u] [history %u/%u, %llu bytes]", |
n, wp->sx, wp->sy, gd->hsize, gd->hlimit, size); |
n, wp->sx, wp->sy, gd->hsize, gd->hlimit, size); |
n++; |
n++; |