diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-11-25 13:31:56 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-11-25 13:31:56 +0000 |
commit | 5cc3d50289830d171ebb2e548c0f1246bfc57826 (patch) | |
tree | 1c487047828210df255b5ef27791e48e6b55f1de /format.c | |
parent | 9ec457575d0db6450d8a436426b4a705c49285aa (diff) | |
download | rtmux-5cc3d50289830d171ebb2e548c0f1246bfc57826.tar.gz rtmux-5cc3d50289830d171ebb2e548c0f1246bfc57826.tar.bz2 rtmux-5cc3d50289830d171ebb2e548c0f1246bfc57826.zip |
Sync OpenBSD patchset 980:
Add a pane_index format string and use it, from Ben Boeckel.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -361,6 +361,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) struct grid_line *gl; unsigned long long size; u_int i; + u_int idx; size = 0; for (i = 0; i < gd->hsize; i++) { @@ -370,9 +371,13 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp) } size += gd->hsize * sizeof *gd->linedata; + if (window_pane_index(wp, &idx) != 0) + fatalx("index not found"); + format_add(ft, "pane_width", "%u", wp->sx); format_add(ft, "pane_height", "%u", wp->sy); format_add(ft, "pane_title", "%s", wp->base.title); + format_add(ft, "pane_index", "%u", idx); format_add(ft, "history_size", "%u", gd->hsize); format_add(ft, "history_limit", "%u", gd->hlimit); format_add(ft, "history_bytes", "%llu", size); |