mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-02 11:29:55 +01:00
Only show history size.
This commit is contained in:
parent
4d7510bb97
commit
4cd1f86359
@ -1,4 +1,4 @@
|
|||||||
/* $Id: cmd-list-windows.c,v 1.12 2007-11-21 22:24:07 nicm Exp $ */
|
/* $Id: cmd-list-windows.c,v 1.13 2007-11-23 13:02:45 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -50,17 +50,16 @@ cmd_list_windows_exec(unused void *ptr, struct cmd_ctx *ctx)
|
|||||||
RB_FOREACH(wl, winlinks, &ctx->session->windows) {
|
RB_FOREACH(wl, winlinks, &ctx->session->windows) {
|
||||||
w = wl->window;
|
w = wl->window;
|
||||||
|
|
||||||
sy = w->screen.hsize + w->screen.dy;
|
|
||||||
size = 0;
|
size = 0;
|
||||||
for (i = 0; i < sy; i++)
|
for (i = 0; i < w->screen.hsize; i++)
|
||||||
size += w->screen.grid_size[i] * 3;
|
size += w->screen.grid_size[i] * 3;
|
||||||
size += sy * (sizeof *w->screen.grid_data);
|
size += w->screen.hsize * (sizeof *w->screen.grid_data);
|
||||||
size += sy * (sizeof *w->screen.grid_attr);
|
size += w->screen.hsize * (sizeof *w->screen.grid_attr);
|
||||||
size += sy * (sizeof *w->screen.grid_colr);
|
size += w->screen.hsize * (sizeof *w->screen.grid_colr);
|
||||||
size += sy * (sizeof *w->screen.grid_size);
|
size += w->screen.hsize * (sizeof *w->screen.grid_size);
|
||||||
|
|
||||||
ctx->print(ctx,
|
ctx->print(ctx,
|
||||||
"%d: %s \"%s\" (%s) [%ux%u] [history %u] [%llu bytes]",
|
"%d: %s \"%s\" (%s) [%ux%u] [history %u, %llu bytes]",
|
||||||
wl->idx, w->name, w->screen.title, ttyname(w->fd),
|
wl->idx, w->name, w->screen.title, ttyname(w->fd),
|
||||||
screen_size_x(&w->screen), screen_size_y(&w->screen),
|
screen_size_x(&w->screen), screen_size_y(&w->screen),
|
||||||
w->screen.hsize, size);
|
w->screen.hsize, size);
|
||||||
|
9
screen.c
9
screen.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: screen.c,v 1.41 2007-11-23 12:48:20 nicm Exp $ */
|
/* $Id: screen.c,v 1.42 2007-11-23 13:02:45 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -281,7 +281,7 @@ screen_draw_start(struct screen_draw_ctx *ctx,
|
|||||||
ctx->cx = s->cx;
|
ctx->cx = s->cx;
|
||||||
ctx->cy = s->cy;
|
ctx->cy = s->cy;
|
||||||
|
|
||||||
memset(&ctx->sel, 0, sizeof ctx->sel);
|
ctx->sel.flag = 0;
|
||||||
|
|
||||||
ctx->attr = s->attr;
|
ctx->attr = s->attr;
|
||||||
ctx->colr = s->colr;
|
ctx->colr = s->colr;
|
||||||
@ -298,7 +298,7 @@ screen_draw_set_selection(struct screen_draw_ctx *ctx,
|
|||||||
struct screen_draw_sel *sel = &ctx->sel;
|
struct screen_draw_sel *sel = &ctx->sel;
|
||||||
|
|
||||||
sel->flag = flag;
|
sel->flag = flag;
|
||||||
if (!flag)
|
if (!sel->flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ey < sy || (sy == ey && ex < sx)) {
|
if (ey < sy || (sy == ey && ex < sx)) {
|
||||||
@ -316,6 +316,9 @@ screen_draw_check_selection(struct screen_draw_ctx *ctx, u_int px, u_int py)
|
|||||||
{
|
{
|
||||||
struct screen_draw_sel *sel = &ctx->sel;
|
struct screen_draw_sel *sel = &ctx->sel;
|
||||||
|
|
||||||
|
if (!sel->flag)
|
||||||
|
return (0);
|
||||||
|
|
||||||
if (py < sel->sy || py > sel->ey)
|
if (py < sel->sy || py > sel->ey)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user