summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/format-draw.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-03-07 10:58:32 +0000
committernicm <nicm@openbsd.org>2020-03-07 10:58:32 +0000
commitb19d25a05c5ab9b16bddc92e85502f8c1cda287e (patch)
tree81e56e164c85bc97935fb522c65ae5c95936babd /usr.bin/tmux/format-draw.c
parentUse snprintf(9) to create the names for the firmware and NVRAM files. This (diff)
downloadwireguard-openbsd-b19d25a05c5ab9b16bddc92e85502f8c1cda287e.tar.xz
wireguard-openbsd-b19d25a05c5ab9b16bddc92e85502f8c1cda287e.zip
Use correct width of right marker so it doesn't draw over status right
when more than one character. Reported by Tyler Culp.
Diffstat (limited to 'usr.bin/tmux/format-draw.c')
-rw-r--r--usr.bin/tmux/format-draw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/format-draw.c b/usr.bin/tmux/format-draw.c
index c4264cde02a..e6ee6218aaa 100644
--- a/usr.bin/tmux/format-draw.c
+++ b/usr.bin/tmux/format-draw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format-draw.c,v 1.14 2020/01/08 14:40:52 nicm Exp $ */
+/* $OpenBSD: format-draw.c,v 1.15 2020/03/07 10:58:32 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -142,7 +142,8 @@ format_draw_put_list(struct screen_write_ctx *octx,
width -= list_left->cx;
}
if (start + width < list->cx && width > list_right->cx) {
- screen_write_cursormove(octx, ocx + offset + width - 1, ocy, 0);
+ screen_write_cursormove(octx, ocx + offset + width -
+ list_right->cx, ocy, 0);
screen_write_fast_copy(octx, list_right, 0, 0, list_right->cx,
1);
width -= list_right->cx;