From 50c5c5674422896a85ed77602a1ead6fed3879da Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Jun 2017 22:37:35 +0000 Subject: [PATCH] Don't write over right border. --- usr.bin/tmux/window-tree.c | 6 +++--- 1 file 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 @@ -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); -- 2.20.1