summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-07-12 14:31:06 +0000
committernicm <nicm@openbsd.org>2017-07-12 14:31:06 +0000
commit2920087aed3ff017eb42be001c829a2140100fbd (patch)
treea4ce77d1654f1255a4f463dc203e342b25f363b7
parentReshuffle vic_start and get rid of the dequeue begin/rollback/commit dance (diff)
downloadwireguard-openbsd-2920087aed3ff017eb42be001c829a2140100fbd.tar.xz
wireguard-openbsd-2920087aed3ff017eb42be001c829a2140100fbd.zip
Line up keys in tree mode, and don't expand windows with one pane. From
Thomas Adam.
-rw-r--r--usr.bin/tmux/mode-tree.c4
-rw-r--r--usr.bin/tmux/window-tree.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/mode-tree.c b/usr.bin/tmux/mode-tree.c
index 88c9a8664ea..b1914b3113b 100644
--- a/usr.bin/tmux/mode-tree.c
+++ b/usr.bin/tmux/mode-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-tree.c,v 1.7 2017/07/04 12:26:14 nicm Exp $ */
+/* $OpenBSD: mode-tree.c,v 1.8 2017/07/12 14:31:06 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -487,7 +487,7 @@ mode_tree_draw(struct mode_tree_data *mtd)
screen_write_cursormove(&ctx, 0, i - mtd->offset);
if (i < 10)
- snprintf(key, sizeof key, "(%c)", '0' + i);
+ snprintf(key, sizeof key, "(%c) ", '0' + i);
else if (i < 36)
snprintf(key, sizeof key, "(M-%c)", 'a' + (i - 10));
else
diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c
index 69459818db9..77a11d4536b 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.12 2017/07/07 16:27:26 nicm Exp $ */
+/* $OpenBSD: window-tree.c,v 1.13 2017/07/12 14:31:06 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -258,8 +258,12 @@ window_tree_build_window(struct session *s, struct winlink *wl, void* modedata,
free(text);
free(name);
+ if (window_count_panes(wl->window) == 1)
+ return (1);
+
l = NULL;
n = 0;
+
TAILQ_FOREACH(wp, &wl->window->panes, entry) {
if (filter != NULL) {
cp = format_single(NULL, filter, NULL, s, wl, wp);