summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/resize.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2018-08-18 20:08:52 +0000
committernicm <nicm@openbsd.org>2018-08-18 20:08:52 +0000
commit647c5c1884e73bec640d4dac204364e62e3fe048 (patch)
tree893191ec42bee1775d9adc5553e396ea5e879bbd /usr.bin/tmux/resize.c
parent.RE causes a line break even if .RS is not open (diff)
downloadwireguard-openbsd-647c5c1884e73bec640d4dac204364e62e3fe048.tar.xz
wireguard-openbsd-647c5c1884e73bec640d4dac204364e62e3fe048.zip
SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.
Diffstat (limited to 'usr.bin/tmux/resize.c')
-rw-r--r--usr.bin/tmux/resize.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.bin/tmux/resize.c b/usr.bin/tmux/resize.c
index c3c9c3ebaad..89d1769198a 100644
--- a/usr.bin/tmux/resize.c
+++ b/usr.bin/tmux/resize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resize.c,v 1.25 2017/10/16 19:30:53 nicm Exp $ */
+/* $OpenBSD: resize.c,v 1.26 2018/08/18 20:08:52 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -36,10 +36,6 @@
*
* This is quite inefficient - better/additional data structures are needed
* to make it better.
- *
- * As a side effect, this function updates the SESSION_UNATTACHED flag. This
- * flag is necessary to make sure unattached sessions do not limit the size of
- * windows that are attached both to them and to other (attached) sessions.
*/
void
@@ -79,11 +75,8 @@ recalculate_sizes(void)
s->attached++;
}
}
- if (ssx == UINT_MAX || ssy == UINT_MAX) {
- s->flags |= SESSION_UNATTACHED;
+ if (ssx == UINT_MAX || ssy == UINT_MAX)
continue;
- }
- s->flags &= ~SESSION_UNATTACHED;
if (lines != 0 && ssy == 0)
ssy = lines;
@@ -107,7 +100,7 @@ recalculate_sizes(void)
ssx = ssy = UINT_MAX;
RB_FOREACH(s, sessions, &sessions) {
- if (s->flags & SESSION_UNATTACHED)
+ if (s->attached == 0)
continue;
if (flag)
has = s->curw->window == w;