mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-25 16:19:02 +01:00
Undo a change to next/previous session that got mixed in prematurely.
This commit is contained in:
parent
8705c6b435
commit
6fcdc714b6
@ -187,9 +187,10 @@ session_next_session(struct session *s)
|
|||||||
struct session *s2;
|
struct session *s2;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s))
|
if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
i = 0;
|
||||||
do {
|
do {
|
||||||
if (i == ARRAY_LENGTH(&sessions) - 1)
|
if (i == ARRAY_LENGTH(&sessions) - 1)
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -208,7 +209,7 @@ session_previous_session(struct session *s)
|
|||||||
struct session *s2;
|
struct session *s2;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
if (ARRAY_LENGTH(&sessions) == 0 || !session_alive(s))
|
if (ARRAY_LENGTH(&sessions) == 0 || session_index(s, &i) != 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user