summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-server-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-server-info.c')
-rw-r--r--usr.bin/tmux/cmd-server-info.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-server-info.c b/usr.bin/tmux/cmd-server-info.c
index 817cda8dca6..189bde3b2f9 100644
--- a/usr.bin/tmux/cmd-server-info.c
+++ b/usr.bin/tmux/cmd-server-info.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-server-info.c,v 1.5 2009/07/28 06:48:44 nicm Exp $ */
+/* $OpenBSD: cmd-server-info.c,v 1.6 2009/08/08 13:29:27 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -57,6 +57,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
struct tty_term_code_entry *ent;
struct utsname un;
struct grid *gd;
+ struct grid_line *gl;
u_int i, j, k;
char out[80];
char *tim;
@@ -120,15 +121,16 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
lines = ulines = size = usize = 0;
gd = wp->base.grid;
for (k = 0; k < gd->hsize + gd->sy; k++) {
- if (gd->data[k] != NULL) {
+ gl = &gd->linedata[k];
+ if (gl->celldata != NULL) {
lines++;
- size += gd->size[k] *
- sizeof (**gd->data);
+ size += gl->cellsize *
+ sizeof *gl->celldata;
}
- if (gd->udata[k] != NULL) {
+ if (gl->utf8data != NULL) {
ulines++;
- usize += gd->usize[k] *
- sizeof (**gd->udata);
+ usize += gl->utf8size *
+ sizeof *gl->utf8data;
}
}
ctx->print(ctx, "%6u: %s %lu %d %u/%u, %zu "