diff options
author | nicm <nicm> | 2017-10-22 13:16:54 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-10-22 13:16:54 +0000 |
commit | 26f1857154aacbca5e6ebbb817aa3b48f02d05bf (patch) | |
tree | cd2770eb6df035fb03739918dec5d2df7f082ab3 | |
parent | d3e8709ab5581bed818346b4b984946d5722665f (diff) | |
download | rtmux-26f1857154aacbca5e6ebbb817aa3b48f02d05bf.tar.gz rtmux-26f1857154aacbca5e6ebbb817aa3b48f02d05bf.tar.bz2 rtmux-26f1857154aacbca5e6ebbb817aa3b48f02d05bf.zip |
Use window_pane_index() when drawing pane numbers (so pane-base-index is
applied), from Thomas Adam. GitHub issue 1125.
-rw-r--r-- | window-tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/window-tree.c b/window-tree.c index b79f5913..a95503f8 100644 --- a/window-tree.c +++ b/window-tree.c @@ -597,7 +597,7 @@ window_tree_draw_window(struct window_tree_modedata *data, struct session *s, u_int loop, total, visible, each, width, offset; u_int current, start, end, remaining, i; struct grid_cell gc; - int colour, active_colour, left, right; + int colour, active_colour, left, right, pane_idx; char *label; total = window_count_panes(w); @@ -694,7 +694,9 @@ window_tree_draw_window(struct window_tree_modedata *data, struct session *s, screen_write_cursormove(ctx, offset, 0); screen_write_preview(ctx, &wp->base, width, sy); - xasprintf(&label, " %u ", loop); + if (window_pane_index(wp, &pane_idx) != 0) + pane_idx = loop; + xasprintf(&label, " %u ", pane_idx); window_tree_draw_label(ctx, offset, 0, each, sy, &gc, label); free(label); |