diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-10-22 13:16:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-10-22 13:16:55 +0000 |
commit | b00a9568384c6eff1c091fe2f0e09b7f86371732 (patch) | |
tree | 76dda4ca183df025132a44f79fd24c799897b16c /usr.bin/tmux | |
parent | 3adad385801ea94298d16d74113721223054a21b (diff) |
Use window_pane_index() when drawing pane numbers (so pane-base-index is
applied), from Thomas Adam. GitHub issue 1125.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/window-tree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c index 83a2a66b8c2..443e4f241aa 100644 --- a/usr.bin/tmux/window-tree.c +++ b/usr.bin/tmux/window-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-tree.c,v 1.19 2017/10/11 12:57:49 nicm Exp $ */ +/* $OpenBSD: window-tree.c,v 1.20 2017/10/22 13:16:54 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |