mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Sync OpenBSD patchset 803:
Dead sessions are never on the active sessions list, so the SESSION_DEAD flag is effectively unused. Remove it.
This commit is contained in:
parent
bb728b89a7
commit
a932742a8a
11
session.c
11
session.c
@ -1,4 +1,4 @@
|
||||
/* $Id: session.c,v 1.79 2010-12-22 15:28:50 tcunha Exp $ */
|
||||
/* $Id: session.c,v 1.80 2010-12-22 15:31:56 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -166,7 +166,6 @@ session_destroy(struct session *s)
|
||||
}
|
||||
if (i == ARRAY_LENGTH(&dead_sessions))
|
||||
ARRAY_ADD(&dead_sessions, s);
|
||||
s->flags |= SESSION_DEAD;
|
||||
}
|
||||
|
||||
/* Find session index. */
|
||||
@ -187,7 +186,7 @@ session_next_session(struct session *s)
|
||||
struct session *s2;
|
||||
u_int i;
|
||||
|
||||
if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
|
||||
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s))
|
||||
return (NULL);
|
||||
|
||||
do {
|
||||
@ -196,7 +195,7 @@ session_next_session(struct session *s)
|
||||
else
|
||||
i++;
|
||||
s2 = ARRAY_ITEM(&sessions, i);
|
||||
} while (s2 == NULL || s2->flags & SESSION_DEAD);
|
||||
} while (s2 == NULL);
|
||||
|
||||
return (s2);
|
||||
}
|
||||
@ -208,7 +207,7 @@ session_previous_session(struct session *s)
|
||||
struct session *s2;
|
||||
u_int i;
|
||||
|
||||
if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
|
||||
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s))
|
||||
return (NULL);
|
||||
|
||||
do {
|
||||
@ -217,7 +216,7 @@ session_previous_session(struct session *s)
|
||||
else
|
||||
i--;
|
||||
s2 = ARRAY_ITEM(&sessions, i);
|
||||
} while (s2 == NULL || s2->flags & SESSION_DEAD);
|
||||
} while (s2 == NULL);
|
||||
|
||||
return (s2);
|
||||
}
|
||||
|
3
tmux.h
3
tmux.h
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.589 2010-12-22 15:31:00 tcunha Exp $ */
|
||||
/* $Id: tmux.h,v 1.590 2010-12-22 15:31:56 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -946,7 +946,6 @@ struct session {
|
||||
struct paste_stack buffers;
|
||||
|
||||
#define SESSION_UNATTACHED 0x1 /* not attached to any clients */
|
||||
#define SESSION_DEAD 0x2
|
||||
int flags;
|
||||
|
||||
struct termios *tio;
|
||||
|
Loading…
Reference in New Issue
Block a user