artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43687ba
)
Do not overflow width when not enough space.
author
nicm
<nicm@openbsd.org>
Tue, 1 Feb 2022 11:52:08 +0000
(11:52 +0000)
committer
nicm
<nicm@openbsd.org>
Tue, 1 Feb 2022 11:52:08 +0000
(11:52 +0000)
usr.bin/tmux/menu.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/menu.c
b/usr.bin/tmux/menu.c
index
bb0d6c5
..
d5fc75c
100644
(file)
--- a/
usr.bin/tmux/menu.c
+++ b/
usr.bin/tmux/menu.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: menu.c,v 1.4
1 2021/11/11 09:22:33
nicm Exp $ */
+/* $OpenBSD: menu.c,v 1.4
2 2022/02/01 11:52:08
nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@
-81,6
+81,8
@@
menu_add_item(struct menu *menu, const struct menu_item *item,
menu->count--;
return;
}
+ if (c->tty.sx <= 4)
+ return;
max_width = c->tty.sx - 4;
slen = strlen(s);