summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-06-30 22:37:36 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-06-30 22:37:36 +0000
commit263f76facd2a5dcc7f2ea79c5f186d6fe3099856 (patch)
tree55f7cd38069747eaeef7a75a93d348ca04d5f4c6 /usr.bin/tmux/window-tree.c
parent871fdcc34e420ade89356318fec24ce24b4e6f53 (diff)
Don't write over right border.
Diffstat (limited to 'usr.bin/tmux/window-tree.c')
-rw-r--r--usr.bin/tmux/window-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c
index 960e59db768..5cfd4ac2784 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.7 2017/06/30 22:36:11 nicm Exp $ */
+/* $OpenBSD: window-tree.c,v 1.8 2017/06/30 22:37:35 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -468,7 +468,7 @@ window_tree_draw_session(struct session *s, struct screen_write_ctx *ctx,
xasprintf(&label, " %u ", wl->idx);
len = strlen(label) / 2;
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2);
- if (len <= width)
+ if (len < width)
screen_write_puts(ctx, &gc, "%s", label);
free(label);
@@ -536,7 +536,7 @@ window_tree_draw_window(struct session *s, struct window *w,
xasprintf(&label, " %u ", i);
len = strlen(label) / 2;
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2);
- if (len <= width)
+ if (len < width)
screen_write_puts(ctx, &gc, "%s", label);
free(label);